Git Product home page Git Product logo

Comments (4)

whatyouhide avatar whatyouhide commented on June 15, 2024 1

@maennchen yeah it sounds good. Thanks for giving @alexanderttalvarez context here, great job 🙃

from gettext.

maennchen avatar maennchen commented on June 15, 2024

This behavior is intentional.

Until recently (#379) this library behaved wrong and looked at it as distinct translations. Unfortunately that is not how GNU gettext defines it to work.

Now the msgid has to be unique.

You can verify this the following way:

test.po

msgid ""
msgstr ""
"Project-Id-Version: POEdit test project\n"
"POT-Creation-Date: \n"
"PO-Revision-Date: \n"
"Last-Translator: Meg Buque\n"
"Language-Team: Elixir <[email protected]>\n"
"Language: it\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 1.7.6\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Poedit-SourceCharset: UTF-8\n"

msgid "1 review"
msgid_plural "%{reviews_count} of %{reviews_total} reviews"
msgstr[0] "1 opinión"
msgstr[1] "%{reviews_count} de %{reviews_total} opiniones"

msgid "1 review"
msgid_plural "%{reviews_showing} reviews of %{reviews_total}"
msgstr[0] "1 opinión"
msgstr[1] "%{reviews_showing} opinones sobre %{reviews_total}"
msguniq test.po                                                                                                                                                                                                                                (⎈ |gke_sustema-operations-apps_europe-west6-a_apps-cluster:default)
msgid ""
msgstr ""
"Project-Id-Version: POEdit test project\n"
"POT-Creation-Date: \n"
"PO-Revision-Date: \n"
"Last-Translator: Meg Buque\n"
"Language-Team: Elixir <[email protected]>\n"
"Language: it\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 1.7.6\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Poedit-SourceCharset: UTF-8\n"

#, fuzzy
msgid "1 review"
msgid_plural "%{reviews_count} of %{reviews_total} reviews"
msgstr[0] ""
"#-#-#-#-#  test.po (POEdit test project)  #-#-#-#-#\n"
"1 opinión\n"
"#-#-#-#-#  test.po (POEdit test project)  #-#-#-#-#\n"
"1 opinión"
msgstr[1] ""
"#-#-#-#-#  test.po (POEdit test project)  #-#-#-#-#\n"
"%{reviews_count} de %{reviews_total} opiniones\n"
"#-#-#-#-#  test.po (POEdit test project)  #-#-#-#-#\n"
"%{reviews_showing} opinones sobre %{reviews_total}"

(Note that only one message is left.)

To work around this, you'll have to work with the msgctxt or a different domain.

from gettext.

maennchen avatar maennchen commented on June 15, 2024

@whatyouhide I'm temporarily pining this issue since more people could stumble upon this when updating.

from gettext.

alexanderttalvarez avatar alexanderttalvarez commented on June 15, 2024

Ok, I understand now. Thanks for your explanation 😃. We'll have to find a way to addapt our translations.

I'm closing the issue then.

from gettext.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.