Repository navigation
Fix the page placeholder in the Croatian info_tag.no_count - #937
Merged
Merged
Conversation
hr.yml used %{page_input} in info_tag.no_count, but info_tag only
passes page and pages for that key (as the other locales' %{page}
shows), so the Croatian text rendered with the literal "%{page_input}".
Use %{page}, and add a locales test that checks info_tag.no_count only
uses the placeholders it is given.
ddnexus
force-pushed
the
fix/hr-placeholder-pr
branch
from
November 6, 2026 05:12
36cc2e5 to
3f12bee
Compare
Owner
|
Thank you @ChandraChaan for spotting this and for the careful write-up: Croatian was indeed rendering the raw placeholder. Merged on Your test will be followed on |
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.
In
gem/locales/hr.yml,info_tag.no_countuses%{page_input}:info_tagonly passespageandpagesfor that key (en.ymlhas"Page %{page} of %{pages}"), and%{page_input}belongs toinput_nav_js. Pagy's i18n leaves unknown placeholders in place, so the Croatian text renders with a literal%{page_input}. This changes it to%{page}.I also added a test to
locales_test.rbthat checks, for every locale file, thatinfo_tag.no_countonly uses the placeholders it is given. It fails only forhr.yml.I couldn't run Ruby locally, so I ran the checks on a fork:
locales::locale file hr.yml#test_0002_uses only the placeholders that info_tag.no_count is givenandExpected ["page_input"] to be empty.648 tests, 1859 assertions, 0 failures).The commit in this PR is the squashed form of the fix branch (identical tree). It is based on
masterasCONTRIBUTING.mdasks; I saw recent PRs end up ondev, so please retarget it if that is where it belongs.