i18n: rework decorator locale keys and calls - #799
Open
nicolas-brousse wants to merge 1 commit into
Open
Conversation
nicolas-brousse
force-pushed
the
rework-decorators-i18n
branch
from
August 19, 2026 16:21
39f6980 to
3353ac3
Compare
B-Rass
reviewed
Aug 19, 2026
Comment on lines
+14
to
+15
| if params[:locale] | ||
| params[:locale] |
Collaborator
There was a problem hiding this comment.
I couldn't figure why you needed this change. Can you light me up?
Collaborator
Author
There was a problem hiding this comment.
That was for test at first, to easily switch locale by adding locale=en in the URL. Maybe we could keep it, otherwise I'll remove it.
Collaborator
There was a problem hiding this comment.
I'm not 100% sure about this, but I'll say to remove it, since we don't need it, and if we do one day, then we'll add it
| it { is_expected.to be_a BadgeComponent } | ||
| it { expect(badge.instance_variable_get(:@color)).to eq :danger } | ||
| it { expect(badge.content).to eq "NON TROUVÉ DANS GLPI" } | ||
| it { expect(badge.content).to eq "NOT FOUND" } |
Collaborator
There was a problem hiding this comment.
Why is it in english now? Don't we agree to have french here? Or was it by default that we choose that?
Collaborator
Author
There was a problem hiding this comment.
Since I use human_attribute_name instead I18n.t. But I didn't check more. It's a bit wierd
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.
human_attribute_nameusage