Bug 45589 - fpc-compiler has hardwired error messages in Russian
Summary: fpc-compiler has hardwired error messages in Russian
Status: NEW
Alias: None
Product: Sisyphus
Classification: Development
Component: fpc-compiler (show other bugs)
Version: unstable
Hardware: all Linux
: P5 normal
Assignee: Nobody's working on this, feel free to take it
QA Contact: qa-sisyphus
URL: http://lists.altlinux.org/pipermail/c...
Keywords: l10n
Depends on:
Blocks: 16863
  Show dependency tree
 
Reported: 2023-03-20 14:17 MSK by Michael Shigorin
Modified: 2023-03-20 14:19 MSK (History)
1 user (show)

See Also:


Attachments
fpc l10 setup script (1.21 KB, text/plain)
2023-03-20 14:17 MSK, Michael Shigorin
no flags Details
sample fpc.spec patch (1.55 KB, patch)
2023-03-20 14:19 MSK, Michael Shigorin
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Shigorin 2023-03-20 14:17:57 MSK
Created attachment 12767 [details]
fpc l10 setup script

fpc has pretty custom (and weird) l10n support with ad hoc naming of compiler error message translation files in varying charsets; the current ALT package as of fpc-compiler 3.2.2-alt4 sets up "errorru.msg" (which is an UTF-8 version of "errorr.msg" that's DOS CP866) by default no matter what.

Aly asked how to change that:
http://lists.altlinux.org/pipermail/community-en/2023-March/001412.html
and my suggestion regarding "errore.msg" actually worked:
http://lists.altlinux.org/pipermail/community-en/2023-March/001414.html

As one of ALT Linux project's explicit goals was correct localization,
it might be worth handing that to fpc (to the reasonable extent given
its peculiarity in l10n department), so I wrote an example setup script
that might be worth calling in %post compiler scriptlet.

Not 100% sure it is since the default /etc/fpc.cfg gets different from the packaged version and would stay the same over package upgrades forcing people
to pay extra attention when the new versions need some new configuration;
my next consideration was that it *might* be worth doing something like
"deconfigure -Fr if it's the only difference" in %preun compiler -- that
would take a slight extension to the script (e.g. adding -u that reverses
the sed line so if the detected $lang and proposed $msg match exactly
what's in the configuration file then this line gets commented out).

2 arbars: may I ask you to do some research this way? :)
Comment 1 Michael Shigorin 2023-03-20 14:19:25 MSK
Created attachment 12768 [details]
sample fpc.spec patch

Not actually tested with a full-blown build, I think it's worth considering
the "undo l10n autosetup before package upgrade" thing first.