-
Notifications
You must be signed in to change notification settings - Fork 166
Flattens .yml files for i18n #10503
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
Merged
Merged
Flattens .yml files for i18n #10503
Changes from all commits
Commits
Show all changes
50 commits
Select commit
Hold shift + click to select a range
23e85b0
Adds .txt for i18n files
zachmargolis 430efb3
Try migrating fixtures for rails-i18n-webpack-plugin
zachmargolis 19c7e6c
WIP
zachmargolis 1af7b08
Remove domain concept from rails-i18n-webpack-plugin
aduth b0f4983
Remove unused helper functions
aduth e12d255
Rename to "FlatYml" backend, since we can parse as YML
zachmargolis 85b67cb
finish that last commit
zachmargolis 9894631
Split transliteration back out
zachmargolis 7a8ec9a
Update normalize-yaml
zachmargolis 1e9cd18
Bring back separate telephony/*.yml files
zachmargolis 927591f
Changelog notes for normalize-yaml
zachmargolis be66fe6
Empty check in script
zachmargolis ea65e62
Merge remote-tracking branch 'origin/main' into margolis-i18n-txt-bac…
zachmargolis d34674e
Add scripts/fix_yml_merge_conflicts to fix addressing issues with lon…
zachmargolis 16705f1
True up en.yml, fix script
zachmargolis ced01a7
Update i18n-tasks
zachmargolis 1dd84e3
wi
zachmargolis 53e2efc
wip
zachmargolis fa5d240
i18n backend refactor miss
zachmargolis 849aa37
patch script
zachmargolis 22909b6
Add i18n-tasks backend
zachmargolis ccbf0bf
Merge remote-tracking branch 'origin/main' into margolis-i18n-txt-bac…
zachmargolis 780b1dc
rails-18n-js plugin looks up nested keys (used for one, other)
zachmargolis 2d97d76
Fix spec for trailing newline handling
zachmargolis 28e25f7
Merge remote-tracking branch 'origin/main' into margolis-i18n-txt-bac…
zachmargolis ec94bb5
Optimize away an extra obj allocation
zachmargolis aeecaf8
Recover datetime translations
zachmargolis 4c91c69
Recover more translation keys for en
zachmargolis 6cc5dc5
Recover translations, update script
zachmargolis b007332
lint fixes
zachmargolis f6f5660
Add changelog
zachmargolis 4cbd071
rubocop fixes
zachmargolis 9669bc4
Remove some missing
zachmargolis 8300bd8
remove extra translations
zachmargolis c82b9f8
lint fix
zachmargolis e77b049
make normalize_yaml
zachmargolis 06236d4
Merge remote-tracking branch 'origin/main' into margolis-i18n-txt-bac…
zachmargolis 5b228cb
Remove unused
zachmargolis 997075b
Merge remote-tracking branch 'origin/main' into margolis-i18n-txt-bac…
zachmargolis 1e44c59
Remove forced quoting in YAML normalization
zachmargolis a334049
Revert Makefile change
zachmargolis c7a1ab8
Update lib/i18n_flat_yml_backend.rb
zachmargolis 3661955
Merge remote-tracking branch 'origin/main' into margolis-i18n-txt-bac…
zachmargolis c3a21d5
Use YAML array syntax, remove array conversion code
zachmargolis d48b20e
Update documentation
zachmargolis f30a45b
Rename confusing variable
zachmargolis 7c251c5
Specs for custom i18n backend
zachmargolis 2104ce6
make normalize_yaml
zachmargolis 40f0540
i18n-tasks unused
zachmargolis 000e9d7
add guard for nil config from running spec/lib/deploy/activate_spec.rb
zachmargolis File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,6 @@ | ||
| { | ||
| "singleQuote": true, | ||
| "trailingComma": "all", | ||
| "printWidth": 100 | ||
| "printWidth": 100, | ||
| "proseWrap": "never" | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
app/javascript/packages/rails-i18n-webpack-plugin/spec/fixtures/locales/en.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| forms.button.cancel: "Cancel" | ||
| forms.button.reset: "Reset" | ||
| forms.button.submit: "Submit" | ||
| forms.dynamic: "Dynamic" | ||
| forms.key1: "value1-en" | ||
| forms.key2: "value2-en" | ||
| forms.messages.one: "One message" | ||
| forms.messages.other: "%{count} messages" | ||
| item.1: "First" | ||
| item.2: "Second" |
8 changes: 8 additions & 0 deletions
8
app/javascript/packages/rails-i18n-webpack-plugin/spec/fixtures/locales/es.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| forms.button.cancel: "Cancelar" | ||
| forms.button.reset: "Reiniciar" | ||
| forms.button.submit: "Enviar" | ||
| forms.dynamic: "Dinámico" | ||
| forms.key1: "value1-es" | ||
| forms.key2: "value2-es" | ||
| forms.messages.one: "Un mensaje" | ||
| forms.messages.other: "%{count} mensajes" |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will affect all Markdown formatted by Prettier. I don't have a strong feeling one way or the other, just noting it has a more widespread impact than just i18n strings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to keep these
.ymlas un-wrapped as possible, so I could back this change out but add it tonormalize-yamlscript as an override?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's fine if we acknowledge this as a project-wide default, which seems reasonable enough?
But yeah, if needed, I think this could also go back to being able to configure
normalize-yamlwith a specific Prettier configuration if we wanted to behave differently specific fornormalize-yaml/ specific for specific sets of files normalized bynormalize-yaml.