Problem in KConfig with language_territory locale strings
Waldo Bastian
bastian at kde.org
Fri Feb 6 15:37:09 GMT 2004
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Fri February 6 2004 12:50, Dr. Juergen Pfennig wrote:
> Caused by the success of KDE it will have to be ported to allmost every
> language in this world and the following kde-core related design problem
> will become evident:
>
> Status: The locale name used in KDE is in the form "language[_territory]"
> (ISO 3166). In the current KDE configuration files only a few terrytories
> are used. But this will have to change. Example canadian french still uses
> uppercase accented characters but people in France don't any more. Or in
> Germany Uppercase Umlaut and sz are still used, the Swiss don't use them
> any more. Conclusion: future KDE releases will have to take much more care
> of such territorial differences.
>
> Problem: There are only a few hundred languages currently in use by larger
> groups of people, but for each language there could be several supported
> territories. Examples:
>
> language: "en" Territories: en_GB en_US en_Au
> language: "fr" Territories: fr_BE fr_CA fr_CH fr_LU
>
> So finally KDE will end up with several hundreds of supported territories.
> Unfortunately the current konfig file parser expects a perfect match for
> the locale string. If the configured locale is "fr_CH" it will ignore
> entries that contain the "fr" language only. Example:
>
> trouble[de] = "A(umlaut)rgenis"
> trouble[de_CH] = "Aergernis"
>
> No problem you say? But if you try to make the german speaking swiss people
> happy wou would have to add the "de_CH" entries to all config files that
> contain "de" strings. If a "de_CH" entry would be missing the user would
> get an english message - not a german one.
>
> Conclusion: If a territory is not supported, KDE should fallback to the
> base language. For a french canadian it would probably be nicer to have a
> french message instead of an english one. This could also reduce the number
> of locale strings that are required in Desktop (or other) files. My current
> KDE 3.2 has 2390 Desktop Files!
>
> Proposed action: Changes in KConfig ? Any suggestions ?
Replace KConfigBackEnd::localeString with a list and replace/expand
KEntryKey::bLocal with an integer field that indicates the "quality" of the
local entry so that later occurring localized entries can replace previous
localized entries of lower quality.
Or, if the only fallback needed is from territory (de_CH) to generic (de), the
localeString change can be omitted.
KEntryKey change will be slightly binary incompatible since it requires
changing struct KEntryKey in kconfigdata.h but it should be possible to put
up to 30 more bits to use without changing the size of the structure. There
is a risk that some old code will fail to init the new bits though, since the
constructor is inline.
Cheers,
Waldo
- --
bastian at kde.org -=|[ SUSE, The Linux Desktop Experts ]|=- bastian at suse.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)
iD8DBQFAI7SlN4pvrENfboIRAocfAKCYX7tZRb0TmBKT5fo7gNVH46fRPgCggLMt
NCPNSZhT3OoNNDcO2XSFy28=
=lFCh
-----END PGP SIGNATURE-----
More information about the kde-core-devel
mailing list