Skip to content

Update languages.csv#2486

Open
svenddpc wants to merge 4 commits into
WeblateOrg:mainfrom
svenddpc:patch-1
Open

Update languages.csv#2486
svenddpc wants to merge 4 commits into
WeblateOrg:mainfrom
svenddpc:patch-1

Conversation

@svenddpc
Copy link
Copy Markdown

@svenddpc svenddpc commented Jun 4, 2026

Added the full Te Reo Maori (mi) plural form formula, which allows for different translations for cases where n is greater than 10.

Added the full Te Reo Maori (mi) plural form formula, which allows for different translations for cases where n is greater than 10.
Comment thread languages.csv Outdated
mh,Marshallese,2,n != 1
mhr,Meadow Mari,2,n != 1
mi,Maori,2,n > 1
mi,Maori,3,n == 1 ? 0 : n < 10 ? 1 : 2;
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking through my installation, to see if there was a place I could make a change to test this new fomat, I noticed in weblate/lang/data.py there are a bunch PLURAL_NAMES defined as sets of formats (e.g. ONE_OTHER_PLURALS which seems to be all the plural formats that have two values a "single" and a "plural" (or "one" and "other") which includes the old setting for Maori, as well as ONE_FEW_MANY_PLURALS, which I guess should include the new one. Since the new format I've added here doesn't match any of the existing ONE_FEW_MANY_PLURALS, does it need to be added somewhere else as well?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've pushed another commit with changes in more places where it's defined (and removed the semi-colon from this entry). Didn't find the names though.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But those values might be generated based on some rules in the pluralRanges files, so maybe I don't need to make changes for that to work :) 🤞

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unless I need to add this tag to the TAG_MAP in export-plural-tags.py?

Removed semi-colon from languages.csv entry for Maori
Copy link
Copy Markdown
Author

@svenddpc svenddpc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't mean to start a review - those should all just have been comments. Always do that :P

Comment thread languages.csv Outdated
mh,Marshallese,2,n != 1
mhr,Meadow Mari,2,n != 1
mi,Maori,2,n > 1
mi,Maori,3,n == 1 ? 0 : n < 10 ? 1 : 2;
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've pushed another commit with changes in more places where it's defined (and removed the semi-colon from this entry). Didn't find the names though.

Comment thread languages.csv Outdated
mh,Marshallese,2,n != 1
mhr,Meadow Mari,2,n != 1
mi,Maori,2,n > 1
mi,Maori,3,n == 1 ? 0 : n < 10 ? 1 : 2;
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But those values might be generated based on some rules in the pluralRanges files, so maybe I don't need to make changes for that to work :) 🤞

Comment thread languages.csv Outdated
mh,Marshallese,2,n != 1
mhr,Meadow Mari,2,n != 1
mi,Maori,2,n > 1
mi,Maori,3,n == 1 ? 0 : n < 10 ? 1 : 2;
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unless I need to add this tag to the TAG_MAP in export-plural-tags.py?

Comment thread PLURALS_DIFF.md
`mh` | Marshallese | nplurals=2; plural=n != 1; | | | |
`mhr` | Meadow Mari | nplurals=2; plural=n != 1; | | | |
`mi` | Maori | nplurals=3; plural=n == 1 ? 0 : n < 10 ? 1 : 2; | | | |
`mi` | Maori | nplurals=3; plural=n == 1 ? 0 : n < 10 ? 1 : 2; | | | nplurals=2; plural=(n > 1); |
Copy link
Copy Markdown
Author

@svenddpc svenddpc Jun 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit by the CI bot seems to be broken? Is that because I made my changes wrong?

Comment thread translate.csv
mfe,Morisyen,2,(n > 1)
mg,Malagasy,2,(n > 1)
mi,Maori,2,(n == 1 ? 0 : n < 10 ? 1 : 2)
mi,Maori,2,(n > 1)
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And is this just undoing my change again? Since these changes are made by a CI bot, I presume that I've done something wrong, or I'm missing something for it to decide to undo my changes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant