Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Switch to nested object pluralisation format for i18n files #11412

Merged
merged 12 commits into from
Aug 16, 2023

Conversation

t3chguy
Copy link
Member

@t3chguy t3chguy commented Aug 15, 2023

For element-hq/element-web#25608
Needs element-hq/element-desktop#1172
Needs element-hq/element-web#25970
Needs matrix-org/matrix-web-i18n#7
Needs #11417

Performed using find src/i18n/strings -type f -exec sh -c 'jq \'to_entries | map(.key |= split("|")) | reduce .[] as $obj({ }; setpath($obj.key; $obj.value))\' {} | sponge {}' \;


This change is marked as an internal change (Task), so will not be included in the changelog.

@t3chguy t3chguy added the T-Task Refactoring, enabling or disabling functionality, other engineering tasks label Aug 15, 2023
@t3chguy t3chguy changed the title Remove pipe pluralisation separator in i18n files Switch to nested object pluralisation format for i18n files Aug 15, 2023
@t3chguy t3chguy self-assigned this Aug 15, 2023
@richvdh
Copy link
Member

richvdh commented Aug 16, 2023

what's the story with the removed perl scripts? Are they no longer used? since when?

Copy link
Member

@richvdh richvdh left a comment

Choose a reason for hiding this comment

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

Help me out here, as a reviewer unfamiliar with this area: does the new format Just Work, or do we have to upgrade some other component to make it understand?

Indeed, is the new format documented anywhere?

test/setup/setupLanguage.ts Outdated Show resolved Hide resolved
@t3chguy
Copy link
Member Author

t3chguy commented Aug 16, 2023

does the new format Just Work

Yup, counterpart uses this format by default, we also configure counterpart to treat | as a delimiter so they're functionally equivalent for counterpart. We don't remove that delimiter as the default is . and our keys are English sentences which contain .s so . as a delimiter would break things

@t3chguy
Copy link
Member Author

t3chguy commented Aug 16, 2023

what's the story with the removed perl scripts? Are they no longer used? since when?

fix-i18n.pl I'm fairly sure was a one time thing
fixup-imports.pl I've never seen used

@t3chguy t3chguy requested a review from richvdh August 16, 2023 10:10
Copy link
Member

@richvdh richvdh left a comment

Choose a reason for hiding this comment

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

seems plausible

@t3chguy t3chguy added the X-Blocked The PR cannot move forward in any capacity until an action is made label Aug 16, 2023
… t3chguy/localazy-0

# Conflicts:
#	src/i18n/strings/bg.json
#	src/i18n/strings/ca.json
#	src/i18n/strings/cs.json
#	src/i18n/strings/da.json
#	src/i18n/strings/de_DE.json
#	src/i18n/strings/el.json
#	src/i18n/strings/en_EN.json
#	src/i18n/strings/en_US.json
#	src/i18n/strings/eo.json
#	src/i18n/strings/es.json
#	src/i18n/strings/et.json
#	src/i18n/strings/eu.json
#	src/i18n/strings/fa.json
#	src/i18n/strings/fi.json
#	src/i18n/strings/fr.json
#	src/i18n/strings/gl.json
#	src/i18n/strings/he.json
#	src/i18n/strings/hu.json
#	src/i18n/strings/id.json
#	src/i18n/strings/is.json
#	src/i18n/strings/it.json
#	src/i18n/strings/ja.json
#	src/i18n/strings/kab.json
#	src/i18n/strings/ko.json
#	src/i18n/strings/lo.json
#	src/i18n/strings/lt.json
#	src/i18n/strings/lv.json
#	src/i18n/strings/nb_NO.json
#	src/i18n/strings/nl.json
#	src/i18n/strings/nn.json
#	src/i18n/strings/pl.json
#	src/i18n/strings/pt.json
#	src/i18n/strings/pt_BR.json
#	src/i18n/strings/ru.json
#	src/i18n/strings/sk.json
#	src/i18n/strings/sq.json
#	src/i18n/strings/sr.json
#	src/i18n/strings/sv.json
#	src/i18n/strings/th.json
#	src/i18n/strings/tr.json
#	src/i18n/strings/uk.json
#	src/i18n/strings/vi.json
#	src/i18n/strings/vls.json
#	src/i18n/strings/zh_Hans.json
#	src/i18n/strings/zh_Hant.json
@t3chguy t3chguy removed the X-Blocked The PR cannot move forward in any capacity until an action is made label Aug 16, 2023
@t3chguy
Copy link
Member Author

t3chguy commented Aug 16, 2023

image

Confirmed Weblate is happy with this adjusted format, it uses dot notation for keys

@t3chguy t3chguy merged commit aee6247 into develop Aug 16, 2023
23 checks passed
@t3chguy t3chguy deleted the t3chguy/localazy-0 branch August 16, 2023 19:08
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
T-Task Refactoring, enabling or disabling functionality, other engineering tasks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants