Repository navigation
Conversation
Fixes typo for 'store_translations' function - issue ruby-i18n#575
patrickgramatowski
marked this pull request as ready for review
November 20, 2021 16:02
Comment on lines
+266
to
+269
| # rule: { | ||
| # 'ü' => 'ue', | ||
| # 'ö' => 'oe' | ||
| # } |
Contributor
Author
There was a problem hiding this comment.
Not sure why rubocop sees this hash with '=>' syntax as valid.
Contributor
Author
There was a problem hiding this comment.
As valid, as far as I understand, rubocop should shout at me to change this but it actually does not do it and maybe it's because of multi-level nesting?
Contributor
Author
There was a problem hiding this comment.
@radar so WDYT, should we stick to the rubocop convention and add something like this:
# store_translations(:de, i18n: {
# transliterate: {
# rule: {
# 'ü': 'ue',
# 'ö': 'oe'
# }
# }
# })or maybe stick to the existing convention like that:
# store_translations(:de, :i18n => {
# :transliterate => {
# :rule => {
# "ü" => "ue",
# "ö" => "oe"
# }
# }
# })
Collaborator
There was a problem hiding this comment.
I'm guessing Rubocop doesn't mind if it's a string or a symbol in this case because it's not an ascii character. I don't know the exact reason, and I don't have a preference for one over the other.
radar
approved these changes
Nov 25, 2021
patrickgramatowski
deleted the
Fix-typo-function-is-missing-closing-parenthesis
branch
November 25, 2021 08:00
patrickgramatowski
restored the
Fix-typo-function-is-missing-closing-parenthesis
branch
November 25, 2021 08:40
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes typo for 'store_translations' function - issue #575