GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gettext() cannot find translations with plural forms · Issue #62519 · python/cpython

gettext() cannot find translations with plural forms #62519

New issue
Copy link
New issue
Copy link
Closed
Closed
gettext() cannot find translations with plural forms#62519
Copy link
Labels
3.10 (EOL)end of lifeend of life3.7 (EOL)end of lifeend of life3.8 (EOL)end of lifeend of life3.9 (EOL)end of lifeend of lifestdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

jwilk
mannequin
opened on Jun 27, 2013
Issue body actions
BPO 18319
Nosy @loewis, @warsaw, @Cito, @jwilk, @gbassiere
PRs
  • bpo-18319: gettext() can retrieve a message even if a plural form exists #19869
  • Files
  • test.mo
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = None
    created_at = <Date 2013-06-27.22:53:23.400>
    labels = ['type-bug', '3.8', '3.9', '3.10', '3.7', 'library']
    title = 'gettext() cannot find translations with plural forms'
    updated_at = <Date 2020-09-18.20:39:10.360>
    user = 'https://github.com/jwilk'

    bugs.python.org fields:

    activity = <Date 2020-09-18.20:39:10.360>
    actor = 'cito'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['Library (Lib)']
    creation = <Date 2013-06-27.22:53:23.400>
    creator = 'jwilk'
    dependencies = []
    files = ['30717']
    hgrepos = []
    issue_num = 18319
    keywords = ['patch']
    message_count = 3.0
    messages = ['191967', '228601', '368346']
    nosy_count = 6.0
    nosy_names = ['loewis', 'barry', 'cito', 'jwilk', 'python-dev', 'Gilles Bassi\xc3\xa8re']
    pr_nums = ['19869']
    priority = 'normal'
    resolution = None
    stage = 'patch review'
    status = 'open'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue18319'
    versions = ['Python 3.7', 'Python 3.8', 'Python 3.9', 'Python 3.10']

    Linked PRs

    • gh-62519: Make pgettext search plurals when translation is not found #107118
    • [3.11] gh-62519: Make pgettext search plurals when translation is not found (GH-107118) #107133
    • [3.12] gh-62519: Make pgettext search plurals when translation is not found (GH-107118) #107134

    Activity

    1. jwilk commented on Jun 27, 2013

      @jwilk
      jwilkmannequin
      on Jun 27, 2013
      MannequinAuthor
      More actions

      gettext() cannot find translations for messages that have plural forms. I would expect that gettext(s) is equivalent to ngettext(s, s, 1) for such messages, as it is implemented in GNU gettext.

      >>> import gettext
      >>> with open('test.mo', 'rb') as mo: trans = gettext.GNUTranslations(mo)
      ... 
      >>> trans.ngettext("egg", "eggs", 1)
      'Ei'
      >>> trans.gettext("egg")
      'egg'
    2. jwilk
      added
      stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directory
      on Jun 27, 2013
    3. BreamoreBoy commented on Oct 5, 2014

      @BreamoreBoy
      BreamoreBoymannequin
      on Oct 5, 2014
      Mannequin
      More actions

      @martin can you comment on this please.

    4. BreamoreBoy
      added
      type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
      on Oct 5, 2014
    5. gbassiere
      added
      3.7 (EOL)end of lifeend of life
      on May 1, 2020
    6. gbassiere commented on May 7, 2020

      @gbassiere
      gbassieremannequin
      on May 7, 2020
      Mannequin
      More actions

      Hi there,

      I worked on a patch for this issue (see attached pull request).

      I would be happy to discuss it with people involved in gettext module maintenance but I'm not sure how to contact them. Is there a dedicated mailing list or an IRC channel or something? I've found i18n-sig but it has been inactive for 5 years...

      Best regards
      Gilles

    7. remilapeyre
      added
      3.8 (EOL)end of lifeend of life
      3.9 (EOL)end of lifeend of life
      3.10 (EOL)end of lifeend of life
      on Jun 9, 2020
    8. ezio-melotti
      transferred this issue fromon Apr 10, 2022
    9. serhiy-storchaka
      added this to Gettext issueson Jun 25, 2022
    10. ambv
      added a commit that references this issue on Jul 23, 2023

      gh-62519: Make pgettext search plurals when translation is not found (#…

      b3c34e5
    11. miss-islington
      added 2 commits that reference this issue on Jul 23, 2023

      pythongh-62519: Make pgettext search plurals when translation is not …

      85dff8c

      pythongh-62519: Make pgettext search plurals when translation is not …

      d7fdfb5
    12. jtcave
      added a commit that references this issue on Jul 23, 2023

      pythongh-62519: Make pgettext search plurals when translation is not …

      73f1ba3
    13. mementum
      added a commit that references this issue on Jul 23, 2023

      pythongh-62519: Make pgettext search plurals when translation is not …

      307e1e2
    14. carljm
      added a commit that references this issue on Jul 24, 2023

      Merge branch 'main' into superfix

      9a6bdfa
    15. serhiy-storchaka
      added 2 commits that reference this issue on Jul 25, 2023

      [3.12] gh-62519: Make pgettext search plurals when translation is not…

      11d86c5

      [3.11] gh-62519: Make pgettext search plurals when translation is not…

      41756e3
    16. ambv commented on Jul 31, 2023

      @ambv
      ambv
      on Jul 31, 2023
      Contributor
      More actions

      This is now fixed. Thanks! ✨ 🍰 ✨

    17. ambv
      closed this as completedon Jul 31, 2023
    18. github-project-automation
      moved this to Done in Gettext issueson Jul 31, 2023
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      3.10 (EOL)end of lifeend of life3.7 (EOL)end of lifeend of life3.8 (EOL)end of lifeend of life3.9 (EOL)end of lifeend of lifestdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

      Projects

      • Gettext issues
        Status
        Done
        Show more project fields

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.