[openstreetmap/openstreetmap-website] Add test for GENDER macro in translations (PR #6342)
Minh Nguyễn
notifications at github.com
Thu Aug 21 17:25:40 UTC 2025
@1ec5 approved this pull request.
> @@ -135,6 +142,16 @@ def check_values_for_raw_html(hash)
end
end
+ def check_values_for_gender_macro(hash)
+ hash.each_pair do |k, v|
+ if v.is_a? Hash
+ check_values_for_gender_macro(v)
+ else
+ raise "Avoid using GENDER macro in '#{k}: #{v}'" if v.include? "{{GENDER:"
This would be a good way to detect the broken `{{PLURAL` syntax I spotted too, since the correct syntax on Translatewiki.net populates different entries in our YAML file instead of leaving that token around.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6342#pullrequestreview-3141671008
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/6342/review/3141671008 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250821/f7d652a8/attachment.htm>
More information about the rails-dev
mailing list