Mailinglist Archive: opensuse-translation (60 mails)

< Previous Next >
[opensuse-translation] LXDE translations
  • From: Andrea Florio <andrea@xxxxxxxxxxxx>
  • Date: Tue, 25 May 2010 16:24:54 +0200
  • Message-id: <4BFBDDB6.9060906@xxxxxxxxxxxx>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi karl, hi lists,

the lxde team finally completed a "workflow" to translate the
only two applications without an upstream translation.

i'm talking about lxcc and lxdm-conf

attached the pot files generated from lxdmconf.moo and lxcc.moo

actually this is the workflow we follow to move from .moo files to .pot

and back from .po to .moo

(generate .ini file)
moo2ini lxdmconf_template.moo > lxdmconf.ini

(generate .pot file we can easly translate)
ini2po lxdmconf.ini lxdmconf.pot

those two steps has just been done.


once you got the translations you do:

(come back to .ini, not translated)
po2ini -t lxdmconf.ini lxdmconf.po lxdmconf.ini

(merge translations (into ini) with template moo)
ini2moo lxdmconf.ini lxdmconf_template.moo > lxdmconf.moo

the point is... can we do it?
there is any way (a bash script) able to make our life easier?


infos about: tools ini2po and po2ini
http://translate.sourceforge.net/wiki/toolkit/ini2po

those are provided by package python-translate-toolkit that i found only
into an home repo home:thomas-schraitle (that miss anyway, at least,
python-iniparse dependency that you need to manually install)

Best regards
Andrea

- --
- ------------------------------------------
Andrea Florio
QSI International School of Brindisi Sys Admin
CISCO CCNA Certified
openSUSE-Education Administrator
openSUSE Official Member (anubisg1)
Email: andrea@xxxxxxxxxxxx
Packman Packaging Team
Email: andrea@xxxxxxxxxxxxxx
Web: http://packman.links2linux.org/
Cell: +39-328-7365667
- ------------------------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.15 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/

iEYEARECAAYFAkv73bYACgkQyCZT87TFPuiBpACggeuN+vSQ2Mc0uDevM0WDawiJ
RQ4AmQFu3ROKo8ZDVvHK/HPuNNnlEV7H
=RGIk
-----END PGP SIGNATURE-----
#!/bin/sh
#
# ini2moo - convert ini files into moo format
#

PATH=/bin:/usr/bin
export PATH

if [ $# -ne 2 ]; then
printf "Usage: moo2ini file.ini file.moo\n" >&2
exit 2
fi

ini_file="$1"
moo_file="$2"

if [ ! -r "${ini_file}" ]; then
printf "Error: could not open '%s'\n" "${ini_file}" >&2
exit 1
fi
if [ ! -r "${moo_file}" ]; then
printf "Error: could not open '%s'\n" "${moo_file}" >&2
exit 1
fi

awk -v application="${moo_file%.moo}" '
BEGIN {
FS="="
moo_file = application ".moo"
moo_keys_len = inside_app = 0
while ((getline < moo_file) > 0)
if (NF==2) moo_keys[++moo_keys_len] = $1
}

/^\[[^]]+\]$/ {
if ($0 == "[" application "]") {
inside_app = 1
} else {
inside_app = 0
}
next
}

inside_app == 1 && NF > 1 && $1 ~ /^[0-9]+$/ {
value = $1
$1 = ""
sub(/^[ ]+/, "")
printf("%s=%s\n", moo_keys[value], $0)
}
' <"${ini_file}"

#!/bin/sh
#
# moo2ini - convert moo files into ini format
#

PATH=/bin:/usr/bin
export PATH

if [ $# -ne 1 ]; then
printf "Usage: moo2ini file\n" >&2
exit 2
fi

moo_file="$1"

if [ ! -r "${moo_file}" ]; then
printf "Error: could not open '%s'\n" "${moo_file}" >&2
exit 1
fi

awk -v application="${moo_file%.moo}" '
BEGIN {
FS = "="
count = 0
printf ("[%s]\n", application)
}

NF == 2 { printf ("%d=%s\n", ++count, $1) }
' <"${moo_file}"


LXDE-Control-Center=
LXDM Settings=
Configure Openbox=
Mouse&Keyboard=
Set Wallpaper=
Screensaver Settings=
Appearance=
PCManFM Settings=
PCManFM Super User Mode=
Refresh Panel=
Install Software=
YaST Control Center=
Session Settings=
Monitor Settings=
lxdm Login Configuration=
choose Language=
Bottom Pane=
autologin=
User=
session=
Theme=
General=
Themes=
Background=
Numlock=
< Previous Next >
This Thread