Days and month in Ubuntu localization

Asked by Lissandru Camboni

Hi all,

Does anyone know how to translate days and months in Ubuntu? Sardinian localization has them wrongly translated, what's the package I have to modify/translate?

Thanks a lot!
Alessandro

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Translations Edit question
Assignee:
No assignee Edit question
Solved by:
Lissandru Camboni
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

So do you want an app which will translate a date into which day of the week it is?

Revision history for this message
Lissandru Camboni (ale-camboni) said :
#2

thanks for your reply. I'm working on the localization of Ubuntu in my language (Sardinian). After installing Sardinian language pack (very partially translated so far) I found that months and days were previosly translated but in a wrong way. I refer to months and days that appear everywere in the operating system: the calendar of the system clock, time of creation and modification of files in file properties as well as in Nautilus when browsing folders, the same ones are used even by thunderbird, etc.
Just to be more precise: if you look at /usr/lib/locale/en_US.utf8/LC_TIME you'll find days and months for US English localization. I would like to have them properly translated in Sardinian in my /usr/lib/locale/sc_IT.utf8/LC_TIME so I'm looking for the package that contains that information.
Hope this could help. Many thanks

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#3

Become an Ubuntu translator:
https://wiki.ubuntu.com/ContributeToUbuntu

You can translate the whole OS if you like and get a whole bunch of kudos as well as expanding the OS into your language etc. Bringing Ubuntu to more people

If you want to find what package a file is in you can run:

dpkg -S file

But in this case it turned up blank for

dpkg -S LC_TIME

Which is weird.

Revision history for this message
Lissandru Camboni (ale-camboni) said :
#4

I'm already an Ubuntu translator, I was wondering if I can correct wrongly translated months and days names through the Rosetta tool, I'm just looking for the package I have to put the hands on to do that.
dpkg -S doesn't not help, it turns up blank to me too, but thank you anyway.
Cheers

Revision history for this message
Sam_ (and-sam) said :
#5
Revision history for this message
Sam_ (and-sam) said :
#6

Regarding packages.

I've searched for 'locale'
https://launchpad.net/ubuntu/+search?text=locale

but translations are greyed out for e.g.
https://launchpad.net/ubuntu/+source/langpack-locales

Since Sardinia has the same time zone italian packages should contain the format, they just need to convert them.
However, maybe ask an expert which package is the right one.
http://ccollins.wordpress.com/2009/01/06/how-to-change-date-formats-on-ubuntu/

Revision history for this message
Sam_ (and-sam) said :
#7

~$ dpkg -S /usr/bin/time-admin
gnome-system-tools

Revision history for this message
Lissandru Camboni (ale-camboni) said :
#8

Thank you Sam, the answer to my problem is now closer than ever, but something is still missing..

I downloaded langpack-locales_2.11+git20100304.orig.tar.gz from
https://launchpad.net/ubuntu/lucid/+source/langpack-locales

and if you look e.g. to the file 'en_US', below LC_TIME you find 'abday', that stands for abbreviated days. The first line is
abday "<U0053><U0075><U006E>";"<U004D><U006F><U006E>";/

It's easy to understand that, in human readable characters that means
abday "Sun";"Mon";/

Now suppose that Sunday abbreviation in US English locale were wrong, let's say "Sum", what I would like to do is to correct that typo. I really suspect that I have to modify that package..

Thanks again

Revision history for this message
Sam_ (and-sam) said :
#9
Revision history for this message
Lissandru Camboni (ale-camboni) said :
#10

OK, I have the solution!
It's quite not trivial:
1. files in langpack-locales cannot be translated via Rosetta tool, as they are glibc strings. So you have to download glibc code doing git clone git://sourceware.org/git/glibc.git
2. Amongst that mess of files in localdata/locale/, open en_US or sc_IT or es_ES or whatever you want to edit, with a simple text editor, do your modification and save.
3. The command git git-diff between the edited and repository version of that file produces a patch.
4. Submit a new bug in bugzilla like this one: http://sourceware.org/bugzilla/show_bug.cgi?id=10425 putting the patch as an attachment and you're done.

Cheers

Revision history for this message
David Planella (dpm) said :
#11

Thanks Lissandru for the detailed info.

You'll find more details on locale files and how to submit changes upstream here:

  https://wiki.ubuntu.com/Translations/KnowledgeBase/AddingNewLanguage#POSIX

Revision history for this message
Sam_ (and-sam) said :
#12

Thanks from me also for the effort and describing the procedure.