Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

_TrN macro always load catalog translations as singular #469

Closed
feikname opened this issue Dec 1, 2016 · 1 comment
Closed

_TrN macro always load catalog translations as singular #469

feikname opened this issue Dec 1, 2016 · 1 comment
Assignees
Labels
bug some feature is broken localization system
Milestone

Comments

@feikname
Copy link
Collaborator

feikname commented Dec 1, 2016

Translations using _TrN macro always stay in the singular if loaded from a catalog (e.g. core_locale: pt_br).

The root of the issue are those 2 files:

  • Sources/core/string.h
  • Sources/core/string.cpp

Specially the GetTextRawPlural() and GetCatalogOfLanguage()->Find() functions.

@feikname feikname added bug some feature is broken localization system labels Dec 1, 2016
@feikname feikname added this to the 0.1.0 milestone Dec 1, 2016
@feikname feikname changed the title _TrN macro is not working as expected _TrN macro always load catalog translations as singular Dec 1, 2016
@mschlumpp
Copy link
Contributor

mschlumpp commented Dec 2, 2016

The parser for the plural expressions seems to be broken, because things like "!=" or ">" won't be parsed.
The reason for this seems to be that ParseLogical is never called. I guess @yvt needs to take a look at this, because I have no idea how the grammar should look like. Additionally the code is really picky about whitespace, because in the case of pt_br it wouldn't even attempt to parse the expression because of the whitespace between "nplurals=2;" and "plural=...".

@yvt yvt self-assigned this Dec 2, 2016
yvt added a commit that referenced this issue Dec 2, 2016
@yvt yvt closed this as completed in #470 Dec 2, 2016
yvt added a commit that referenced this issue Dec 2, 2016
VelocityRa pushed a commit to VelocityRa/openspades that referenced this issue Dec 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug some feature is broken localization system
Projects
None yet
Development

No branches or pull requests

3 participants