Bug 45589

Summary: fpc-compiler has hardwired error messages in Russian
Product: Sisyphus Reporter: Michael Shigorin <mike>
Component: fpc-compilerAssignee: Nobody's working on this, feel free to take it <nobody>
Status: NEW --- QA Contact: qa-sisyphus
Severity: normal    
Priority: P5 CC: arbars
Version: unstableKeywords: l10n
Hardware: all   
OS: Linux   
URL: http://lists.altlinux.org/pipermail/community-en/2023-March/001412.html
See Also: http://bugzilla.altlinux.org/show_bug.cgi?id=25500
Bug Depends on:    
Bug Blocks: 16863    
Attachments:
Description Flags
fpc l10 setup script
none
sample fpc.spec patch none

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.