While translating, I found the string "noindex". I think this should not be translated, as robots will probably no understand the command otherwise. The string was found in these pages - koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-authorities-home.tt:8 - koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-browse.tt:9 - koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt:28 I added a general comment in weblate, but it should probably not be picked up by the translating tool.
Created attachment 166674 [details] [review] Bug 36845: Exclude meta tag from the translations This bug originaly wants to get rid of "noindex" coming from this meta tag: <meta name="robots" content="noindex"> But actually we have other strings from the meta tags that should not be translated. Test plan: 0. Do not apply this patch 1. cd misc/translator/po && gulp po:update --lang es-ES (or any other lang) 2. git commit -a -m"wip" 3. Apply this patch 4. Repeat 1 and git diff to show the diff Notice that strings that should not be translated are removed from the po files (actually commented)
Created attachment 166737 [details] [review] Bug 36845: Exclude meta tag from the translations This bug originaly wants to get rid of "noindex" coming from this meta tag: <meta name="robots" content="noindex"> But actually we have other strings from the meta tags that should not be translated. Test plan: 0. Do not apply this patch 1. cd misc/translator/po && gulp po:update --lang es-ES (or any other lang) 2. git commit -a -m"wip" 3. Apply this patch 4. Repeat 1 and git diff to show the diff Notice that strings that should not be translated are removed from the po files (actually commented) Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Thank you Jonathan! I was very confused by the additions in the diff until I saw "(actually commented)" in step 4. Phew!
for my $a ('alt', 'content', 'title', 'value', 'label', 'placeholder', 'aria-label') { if ($attr->{$a}) { next if $a eq 'label' && $tag ne 'optgroup'; next if $a eq 'content'; Why do we loop over content?
(In reply to Marcel de Rooy from comment #4) > Why do we loop over content? I wondered the same thing. I don't see any instances of a content attribute being used for something which needs to be translated. MDN says <meta> is the only element the attribute can be used with. Theoretically the 'meta description' might have translatable content but we have that populated by a system preference so the content can't be translated anyway.
Created attachment 166936 [details] [review] Bug 36845: Do not loop over the content attribute We skip it.
Created attachment 166980 [details] [review] Bug 36845: Exclude meta tag from the translations This bug originaly wants to get rid of "noindex" coming from this meta tag: <meta name="robots" content="noindex"> But actually we have other strings from the meta tags that should not be translated. Test plan: 0. Do not apply this patch 1. cd misc/translator/po && gulp po:update --lang es-ES (or any other lang) 2. git commit -a -m"wip" 3. Apply this patch 4. Repeat 1 and git diff to show the diff Notice that strings that should not be translated are removed from the po files (actually commented) Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 166981 [details] [review] Bug 36845: Do not loop over the content attribute We skip it. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
This is a string change so to speak, but I think removing strings doesn't really count.
Pushed for 24.05! Well done everyone, thank you!
Pushed to 23.11.x for 23.11.06
Backported to 23.05.x for upcoming 23.05.12