site  contact  subhomenews

Fixed translate PuppyPin back to en

February 26, 2023 — BarryK

Ha ha, tonight I was thinking "this is it!"; will release easyOS 5.0. However, some more testing revealed a problem. Feodor reported some help files remaining in French when he changed from French to English, which I reported in previous blog post:

https://bkhome.org/news/202302/some-little-tweaks-before-releasing-easyos-50.html

What I also discovered, and maybe Feodor mentioned this, don't recall, was some desktop icon labels remained in French.

Oh dear, that turned out to be a difficult bug. In French, the "trash" icon is labeled "Déchets". Changing locale to en_US in QuickSetup and restarting X, it was stuck on the French text.

After much puzzlement, found the cause. The translation of PuppyPin en-to-fr is done by a regular expression like this:

s%"trash"%"Déchets"%

However, when ROX-Filer starts and reads PuppyPin, it changes the label "Déchets" in PuppyPin to "Déchets"

To convert back to English, /usr/sbin/fixdesk performs a reverse regex operation:

s%"Déchets"%"trash"%

...which doesn't work.

ASCII labels convert back to English, but not characters with accents. How on earth to fix that?

I figured out a fix, commit:

https://github.com/bkauler/woofq/commit/a8d8b70a2714ef1d4fa64407bb594e6dc70a8903

...roundabout coding, but it works.    

Tags: easy