[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#448216: Support 3-letter codes for package description translations in APT (was: Re: Bug#448216: Waiting 2 years ago...)



2010/2/5 Marcos <marcoscostales@gmail.com>:
> We're waiting more of 2 years ago.
Don't (busy-)wait for it: Invest the time instead to provide a good
patch for it. :) It sometimes also help (as you see now)
to poke someone ~ but it is far better to do this with some
more information: for example, i didn't know that this "minor" bug
is blocking someones work! (the original bugreport only talks about
private use) The priority had increased by far with this information…


But enough storytelling:
In this specific bug case a patch from me [0] for this and a few other
Translation-file-specific things is pending for the next ABI-break
which will happen sometime in the future (before squeeze).

The relevant lines from the patch for this bug should be:
> // get the environment language code
> // we extract both, a long and a short code and then we will
> // check if we actually need both (rare) or if the short is enough
> string const envMsg = string(Locale == 0 ? std::setlocale(LC_MESSAGES, NULL) : Locale);
> size_t const lenShort = (envMsg.find('_') != string::npos) ? envMsg.find('_') : 2;
> size_t const lenLong = (envMsg.find('.') != string::npos) ? envMsg.find('.') : (lenShort + 3);
> string envLong = envMsg.substr(0,lenLong);
> string const envShort = envLong.substr(0,lenShort);

I don't know if this really handles all cases as i don't know much about
locales, but it should handle at least e.g. de, de_DE, ast_DE (bogus) and
de_DE.UTF-8 and given that nobody else cared to provide a patch for it
i guess this will be better than nothing. This is btw also true for
the rest of the patch [0] as all my questions in the LongDesc thread [1]
remained unanswered…


Best regards / Mit freundlichen Grüßen,


David Kalnischkies

[0] http://bazaar.launchpad.net/~donkult/apt/sid/revision/1920 and ff.
[1] http://lists.debian.org/deity/2009/08/msg00112.html



Reply to: