Page MenuHomePhabricator

Update librsvg to > 2.44.10
Open, Stalled, LowPublic

Description

Several librsvg issues are not fixed in 2.44.10 (Debian Buster), but are in later versions. Debian Bullseye (testing) is currently shipping 2.50.1.

Event Timeline

Reedy changed the task status from Open to Stalled.Oct 15 2020, 12:51 AM

The Commons file

offers a quick and easy switch diagnostic because it displays the IETF language code.

The current version of Commons has the librsvg 2.40 bug that match the first zh tag. Consequently, all of these these display zh-Hans

Same issue happens with ku-Arab, ku-Latn, and ku; sr-EC, sr-EL, sr-Cyrl, sr-Latn, and sr.

Could somebody try the SVG file

with the newer librsvg 2.44 or librsvg 2.50?

  • $ LANG=zh-hans rsvg-convert -w 512 -h 224 -o result-zh-hans.png SystemLanguage.svg
  • $ LANG=zh-hant rsvg-convert -w 512 -h 224 -o result-zh-hant.png SystemLanguage.svg
  • $ LANG=zh-cn rsvg-convert -w 512 -h 224 -o result-zh-cn.png SystemLanguage.svg
  • $ LANG=zh-tw rsvg-convert -w 512 -h 224 -o result-zh-tw.png SystemLanguage.svg
  • $ LANG=sr-ec rsvg-convert -w 512 -h 224 -o result-sr-ec.png SystemLanguage.svg
  • $ LANG=sr-el rsvg-convert -w 512 -h 224 -o result-sr-el.png SystemLanguage.svg

note: Having the librsvg package installed does not mean you get the rsvg-convert command as well. You'll have to apt install librsvg2-bin for that.

edit: I had pasted results but from 2.44.10 until I realized it is about anything > 2.44.10. so removed that again. nevermind me.

@Dzahn Thank you very much. The test results (now removed) suggest that hyphens are death. I do not know why the switch element's default clause "other" was not displayed. That suggests something else is awry. The SVG file validates.

Those tests simulate what MW would do with an updated librsvg. With the old librsvg the first subtag would have effect, but the new version does not even do that.

In other words, we cannot update to a new version of librsvg without breaking breaking multilingual SVG files that use hyphenated language tags.

This issue is more serious than T261192.

So the update should be blocked until https://gitlab.gnome.org/GNOME/librsvg/-/issues/356 is resolved (or WMF does its own localization).

Federico is willing to fix #356. See https://gitlab.gnome.org/GNOME/librsvg/-/issues/729 . (After such a fix, there may still be issues with WMF bogus langtags such as sr-EC.)

edit: I had pasted results but from 2.44.10 until I realized it is about anything > 2.44.10. so removed that again. nevermind me.

I would expect that 2.44.7 is good enough. @Aklapper, @AntiCompositeNumber or @JoKalliauer could try it in 2.50.

@Glrx sorry I missed it earlier.

bash-input
#!/bin/bash
rsvg-convert --version
LANG=de rsvg-convert -w 512 -h 224 -o result-de.png  SystemLanguage.svg
LANG=de-at rsvg-convert -w 512 -h 224 -o result-de-at.png  SystemLanguage.svg
LANG=de_at rsvg-convert -w 512 -h 224 -o result-de_at.png  SystemLanguage.svg
LANG=de_at.UTF-8 rsvg-convert -w 512 -h 224 -o result-de_atUTF8.png  SystemLanguage.svg
LANG=sr-ec rsvg-convert -w 512 -h 224 -o result-sr-ec.png  SystemLanguage.svg
LANG=sr_ec rsvg-convert -w 512 -h 224 -o result-sr_ec.png  SystemLanguage.svg
LANG=sr-el rsvg-convert -w 512 -h 224 -o result-sr-el.png  SystemLanguage.svg
LANG=sr_el rsvg-convert -w 512 -h 224 -o result-sr_el.png  SystemLanguage.svg
LANG=zh-cn rsvg-convert -w 512 -h 224 -o result-zh-cn.png  SystemLanguage.svg
LANG=zh_cn rsvg-convert -w 512 -h 224 -o result-zh_cn.png  SystemLanguage.svg
LANG=zh-hans rsvg-convert -w 512 -h 224 -o result-zh-hans.png  SystemLanguage.svg
LANG=zh_hans rsvg-convert -w 512 -h 224 -o result-zh_hans.png  SystemLanguage.svg
LANG=zh-hant rsvg-convert -w 512 -h 224 -o result-zh-hant.png  SystemLanguage.svg
LANG=zh_hant rsvg-convert -w 512 -h 224 -o result-zh_hant.png  SystemLanguage.svg
LANG=zh-tw rsvg-convert -w 512 -h 224 -o result-zh-tw.png  SystemLanguage.svg
LANG=zh_tw rsvg-convert -w 512 -h 224 -o result-zh_tw.png  SystemLanguage.svg
terminal-output:

rsvg-convert version 2.50.5
(librsvg 2.51.1 gave the same png-results as with librsvg 2.50.5)

png-Result
requested by Glrx

everything containing - gets rendered as "other"

zh-hanszh-hantzh-cnzh-twsr-ecsr-el
bash-input as in my post

_ matches with the first zh or sr tag

dede-atde_atde_at.UTF-8sr-ecsr_ecsr-elsr_elzh-cnzh_cnzh-hanszh_hanszh-hantzh_hantzh-twzh_tw

@JoKalliauer Thanks for showing that hyphens do not work, that 2.50 shows the default when there is no match, and that simply substituting an underscore for a hyphen does not solve the problem.

librsvg needs a way to specify IETF langtags (Gnome #356).