Scottish Gaelic as a locale

Hi Michael,

Speaking of which, CLDR has finally acted, so gd now has a decent xml
dataset on there too, in case that makes it easier
http://unicode.org/cldr/trac/ticket/3914

Thanks for this. Regarding the UI translation, could you please go to
https://translations.documentfoundation.org/gd/libo34x_ui/review.html
and correct bugs there. For example, please review 'variables', and
'short', I see obviuos errors there.
"Do you want to delete the table '%1'?" -> "gu?" etc.

Thanks,
Andras

I will, it's on my to do list and b*** you just spotted one of those junk files the previous release had in them, I thought I had dealt with them all >.< Good catch.

Michael

07/10/2011 07:03, sgrìobh Andras Timar:

My apologies if this is stuff that has been brought up before but I've only been active since about 2009 (originally on OO). But there are some aspects of the process which I'd like to bring up for potential discussion to make LO better from various points of view.

1) yes/no
There is no coherent approach to questions and answers, some are clearly paired, some rely on the strings for yes/no in some other place. I would personally like to see yes/no questions handled like plurals (see below though). There are two main reasons, both related to the fact that in a large number of languages, a bipolar yes/no pair does not exists.
- it creates weird phrases
- it creates phrases which are much longer

Let me use Gaelic as an example. Gaelic (as does Irish, Welsh, Chinese etc) has no single words for yes and no. Instead, the verb is repeated, if necessary with a negative. For example "Open the %s" which can be handled via a yes/no offering, in idiomatic Gaelic becomes
Am fosglar %s?
Fosglar (will open)
Chan fhosglar (will not open)

So there are as many "words" for yes and no as there are verbs. The workaround is currently to phrase all questions that they can be answered with the tha (be)/chan eil (not be) pair. The problem is, that turns the above into:
A bheil thu airson %s fhosladh (are you for opening %s)
Tha/Chan eil

2) Accelerators
Could these *please* be automated by some dandy piece of script rather than the translator spending hours trying to make sure they don't overlap, then watching them overlap and spending even more time finding the right one and changing it? Surely this can be automated.

3) Plurals
Implementation of plurals seems to be ... random. Many strings in theory would work much better if they were just put up for translation with plural formatting. "Simple plurals" are an even worse headache.

4) Line breaks
As with the accelerators, can't these be automated? How am I supposed to know where to break a line, I don't know how much space there is, if the window automatically flexes etc etc. As i see it \n does not belong in the translation part of l10n.

Thoughts?

Cheers

Michael

Hi Michael,

2) Accelerators
Could these *please* be automated by some dandy piece of script rather than
the translator spending hours trying to make sure they don't overlap, then
watching them overlap and spending even more time finding the right one and
changing it? Surely this can be automated.

I'll answer to other items later, but this one is easy. Accelerators
are generated automatically when you omit them from your translation.
VCL takes care of them so they don't overlap.

Best regards,
Andras

Hi Michael,

> 2) Accelerators
> Could these *please* be automated by some dandy piece of script rather
than
> the translator spending hours trying to make sure they don't overlap,
then
> watching them overlap and spending even more time finding the right one
and
> changing it? Surely this can be automated.
>

I'll answer to other items later, but this one is easy. Accelerators
are generated automatically when you omit them from your translation.
VCL takes care of them so they don't overlap.

Best regards,
Andras

So, for those who have accelerators is it OK to remove them from

pootle translation files?

If I only knew it before.

Is there any chance of someone with skills make a bash script to remove
accelerators from translation (msgstr) files?

It would be very usefull.

Hi Sergio,

Is there any chance of someone with skills make a bash script to remove
accelerators from translation (msgstr) files?

It would be very usefull.

I can remove them for you, but I think it is a bit drastic. :slight_smile: For
example there may be conventions in your language, too, e.g. File menu
always has the F key as accelerator etc.

Best regards,
Andras

Hi Sergio,

> Is there any chance of someone with skills make a bash script to remove
> accelerators from translation (msgstr) files?
>
> It would be very usefull.
>

I can remove them for you, but I think it is a bit drastic. :slight_smile: For
example there may be conventions in your language, too, e.g. File menu
always has the F key as accelerator etc.

Best regards,
Andras

Hi Andras,

Yes, that is true. But tell me something. Do letters used as accelerators,
without ~, remain underlined?

If I only knew it before.

Yes, quite... if only.

13/10/2011 16:56, sgrìobh Andras Timar:

I can remove them for you, but I think it is a bit drastic.:slight_smile: For
example there may be conventions in your language, too, e.g. File menu
always has the F key as accelerator etc.

Best regards,
Andras

No, Gaelic has no such convention, except not to place them on accented characters (like à è ì ò ù) - I think I'll look and see how big a mess they are when we get a build for my locale and I may get you to strip them all.

We need a dummy's guide to translating LO :slight_smile:

Michael

<http://www.foramnagaidhlig.net/stuth/geamannan/tetris/>

For Slovak is the same. Please feel free to remove them. Just please let me
know, when you do so.

I agree with the dummy manual :slight_smile:

Dňa 13.10.2011 17:49, Sérgio Marques wrote / napísal(a):

Is there any chance of someone with skills make a bash script to remove
accelerators from translation (msgstr) files?

Hi, this seems to be easy:

In the topmost directory issue the following command:

sed -i.xx '/^msgstr/ s/\~//g' `find . -name \*po`

Explanation:

find . -name \*po finds all po files
`find . -name \*po` enters list of these files to the command
sed -i does inplace modification, backing up the original file to name.po.xx

the command s/\~//g replaces all ~character by nothing
/^msgstr/ allows to do that only on lines, which start by msgstr

(you probably do no want to change the English lines and the lines which
specify ~ as the accelerator.)

Once done, you can check the differences by:

for i in `find . -name \*.po`; do diff $i.xx $i >$i.diff; done

for each po file, a file with differences is created with the following
records:
73c73 .... line number
< msgstr "Otvo~riť len na čítanie" .... input

Hi Milos,

Thanks for Your well done explanation.

Andras said that he could do it so I´m waiting for his response to my post.
I think it is better to be done by someone that has experience with such
operations.

But in the meantime I will certainly try Your commands and post an feedback.

In some other posts someone said that it is possible to upload the whole
directory to pootle but I don´t know how.

Just one more question. If I download whole directory from pootle, when
unzip it I have a folder with several subfolders. Does Your command work on
parent folder or do I have to enter in each subfolder and do the command on
them.

regards

When uploading pootle works like this:
- It compares the file name of the file, that you are uploading with the files
that he has on the server (including paths)
- then depending on you access rights and option choose when you upload the
file you can:
1. overwrite a file with matching name on the server with your file
2. merge matching translation in the file with matching name on the server
with your file's translations (conflicts will be fuzzy)
3. merge matching translation in the file with matching name on the server
with your file's translations (new translations and conflicts will be fuzzy)
4. merge your file and the file on the server with matching name (add new
msgid strings)

If you want to do this with more files at once, just zip them in one file and
the server then opens the archive and does the matching of the names of the
files in the archive.

I personally do not use pootle, because for many years I was working with
kbabel and now lokalize and I usually do my translations offline (when I am on
the plane). What I do is I download the zip, unpack in directory on my
computer, then do the translations. After I am finished, I zip it back and use
2nd option for upload.
So far works like a charm.... :slight_smile:

> In some other posts someone said that it is possible to upload the whole
> directory to pootle but I don´t know how.

If you want to do this with more files at once, just zip them in one file
and
the server then opens the archive and does the matching of the names of the
files in the archive.

That was my doubt. When uploading I was using one by one file.

I personally do not use pootle, because for many years I was working with
kbabel and now lokalize and I usually do my translations offline (when I am
on
the plane). What I do is I download the zip, unpack in directory on my
computer, then do the translations. After I am finished, I zip it back and
use
2nd option for upload.
So far works like a charm.... :slight_smile:

Just like me. I´m more poedit user and I prefer offline method.

regards

Dňa 14.10.2011 16:08, Sérgio Marques wrote / napísal(a):

Hi Milos,

Thanks for Your well done explanation.

Andras said that he could do it so I´m waiting for his response to my post.
I think it is better to be done by someone that has experience with such
operations.

But in the meantime I will certainly try Your commands and post an feedback.

In some other posts someone said that it is possible to upload the whole
directory to pootle but I don´t know how.

Just one more question. If I download whole directory from pootle, when
unzip it I have a folder with several subfolders. Does Your command work on
parent folder or do I have to enter in each subfolder and do the command on
them.

Just that one for all subfolders. The `find . -name \*.po` command does
the trick - it finds all po files in the tree specified by the first
argument to find (. (dot) in this case, meaning "this directory").
Milos

Thanks Milos,

I wil try it.

regards

011/10/14 Milos Sramek <sramek.milos@gmail.com>

Dňa 13.10.2011 17:49, Sérgio Marques wrote / napísal(a):
> Is there any chance of someone with skills make a bash script to remove
> accelerators from translation (msgstr) files?
Hi, this seems to be easy:

In the topmost directory issue the following command:

sed -i.xx '/^msgstr/ s/\~//g' `find . -name \*po`

Explanation:

find . -name \*po finds all po files
`find . -name \*po` enters list of these files to the command
sed -i does inplace modification, backing up the original file to
name.po.xx

the command s/\~//g replaces all ~character by nothing
/^msgstr/ allows to do that only on lines, which start by msgstr

(you probably do no want to change the English lines and the lines which
specify ~ as the accelerator.)

Once done, you can check the differences by:

for i in `find . -name \*.po`; do diff $i.xx $i >$i.diff; done

for each po file, a file with differences is created with the following
records:
73c73 .... line number
< msgstr "Otvo~riť len na čítanie" .... input
---
> msgstr "Otvoriť len na čítanie" ..... output

If you want to see the ~ characters, use the following before and after
deletion

grep \~ `find . -name \*.po`

While it is easy to get all po files from pootle, I do not know, if it
is possible to upload many files at once. Perhaps, git access is useful
to do this.

Be careful, always make backups and check the result

Enjoy
Milos

Hi again Milos,

The commando work like a charm. Will wait till Andras reply to see my next
move. But now, how can I remove in one step the files generated? (diff and
po.xx)

regards

Sérgio Marques

Dňa 15.10.2011 14:24, Sérgio Marques wrote / napísal(a):

011/10/14 Milos Sramek <sramek.milos@gmail.com>

Dňa 13.10.2011 17:49, Sérgio Marques wrote / napísal(a):

Is there any chance of someone with skills make a bash script to remove
accelerators from translation (msgstr) files?

Hi, this seems to be easy:

In the topmost directory issue the following command:

sed -i.xx '/^msgstr/ s/\~//g' `find . -name \*po`

Explanation:

find . -name \*po finds all po files
`find . -name \*po` enters list of these files to the command
sed -i does inplace modification, backing up the original file to
name.po.xx

the command s/\~//g replaces all ~character by nothing
/^msgstr/ allows to do that only on lines, which start by msgstr

(you probably do no want to change the English lines and the lines which
specify ~ as the accelerator.)

Once done, you can check the differences by:

for i in `find . -name \*.po`; do diff $i.xx $i >$i.diff; done

for each po file, a file with differences is created with the following
records:
73c73 .... line number
< msgstr "Otvo~riť len na čítanie" .... input
---

msgstr "Otvoriť len na čítanie" ..... output

If you want to see the ~ characters, use the following before and after
deletion

grep \~ `find . -name \*.po`

While it is easy to get all po files from pootle, I do not know, if it
is possible to upload many files at once. Perhaps, git access is useful
to do this.

Be careful, always make backups and check the result

Enjoy
Milos

Hi again Milos,

The commando work like a charm. Will wait till Andras reply to see my next
move. But now, how can I remove in one step the files generated? (diff and
po.xx)

Hi

rm `find . -name \*.xx`

the command "find . -name \*.xx" finds all *.xx files and the backquotes
`` just take the output of the find command and insert it as a list of
arguments to the rm command.

Milos

Hi,
A simple question: When there is no manual accelerator set, do
accelerators always remain the same? What if some menu items are
removed in a future version?
Those who use accelerators know what I mean. Every new version you
should learn it again?!

Exactly... for what it worth, leting the software define shortcuts may lead do inconsistencies among versions and disrupt users already used to the old shortcuts. I expect some rants from them.

Unfortunately, the best way is to manually define each shortcut, dialog by dialog.

Now, since this is very cumbersome, a tool to map each dialog with pootle file/section is a must.

Regards
Olivier