LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   k3b localization -- Request for testing (https://www.linuxquestions.org/questions/slackware-14/k3b-localization-request-for-testing-4175467840/)

markush 06-29-2013 01:05 PM

k3b localization -- Request for testing
 
Hi,

after the very helpful posting from BrZ in this thread yesterday, I wondered if it would be possible to create Slackware-packages for the localization of k3b.

So I've written a little script and built some packages for other languages (than German). I've uploaded them here

After installing the package, start k3b and in the menu go to "Help"->"Change Application Language", there should the language of the installed l10n package be listed.

I'll build packages for additional languages soon. Please try it out and post here if it doesn't work for your language.
I'm running Slackware64-current, please let me know if it doesn't work for earlier versions of Slackware.

If it works I'll also provide the Slackbuild-script I'm using to build the packages.

Thanks in advance

Markus

gmgf 06-29-2013 01:32 PM

Thanks markush,

k3b-l10n-fr_noarch.tgz

work fine here ;)

markush 06-30-2013 12:09 PM

Hi gmgf, I'm happy that it works for you.

I've now completed the list of packages for all languages available at kde.org

As far as I can tell it works for all the languages.

Now I am fiddling with the kde-repository in order to find out how to automate the process of package-building/updating. A good opinion to learn about subversion ;)

Markus

ahlr 06-30-2013 07:12 PM

k3b-l10n-pt_BR_noarch.tgz work fine!

Only one translate error, audio in en is audio in pt_BR, not áudio. ;)

TKS!!!!

markush 07-01-2013 01:55 AM

Quote:

Originally Posted by ahlr (Post 4981394)
k3b-l10n-pt_BR_noarch.tgz work fine!

Only one translate error, audio in en is audio in pt_BR, not áudio.

TKS!!!!

Well, nice to read that it's working for you :)

The translations are made at kde.org, I've only picked up the po-files. If you want to provide a better translation you should sign up there and find out how you can contribute.

There are several languages with incomplete translations.

Markus

markush 07-01-2013 04:49 AM

Now I found out how to download the po-files automatically with wget from the kde-repository. This makes it easier to use the SlackBuild script. Here it is
Code:

#!/bin/sh

# Slackware build script for k3b-l10n

# Copyright 2013 Markus Hutmacher mailing(at)markhu.de

# Usage: if you provide a language (for example de or it) as a parameter
# to this script, it will create the k3b-localization-package for this
# language.
# Otherwise it will try to detect the language by examining the $LANG
# environment variable.

# The available languages can be found at
# http://websvn.kde.org/*checkout*/trunk/l10n-kde4/

# If you find that the translation for your language is not yet complete,
# you should consider to sign up at the kde project and contribute to the
# translation

base=/tmp
mirror="http://websvn.kde.org/*checkout*/trunk/l10n-kde4/"
builddir="k3b-l10n"

# check if we are running this script as root
if [ "`id -u`" != 0 ]; then
    echo "You must be root to run this script!"
    exit 1
fi

if [ $# = 1 ]; then
    lang=$1
else
    lang=$(echo $LANG | sed -n 's/_.*$//p')
fi
 
if [ ! -d $base/$builddir-$lang ]; then
    mkdir -p $base/$builddir-$lang
    cd $base/$builddir-$lang
else
    cd $base/$builddir-$lang
    #rm *.po
fi

for file in \
    desktop_extragear-multimedia_k3b.po \
    k3b.po \
    kio_videodvd.po \
    libk3b.po \
    libk3bdevice.po
do
    wget $mirror/$lang/messages/extragear-multimedia/$file
    mofile=$(echo $file | sed -n 's/po/mo/p')
    msgfmt $file -o $mofile
done

mkdir -p package-$lang/usr/share/locale/$lang/LC_MESSAGES
mv *.mo package-$lang/usr/share/locale/$lang/LC_MESSAGES/
mkdir -p package-$lang/install
cd package-$lang/install

sed "s/LANG/$lang/g" > slack-desc <<DASISTDASENDE
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description.  Line
# up the first '|' above the ':' following the base package name, and the '|'
# on the right side marks the last column you can put a character in.  You must
# make exactly 11 lines for the formatting to be correct.  It's also
# customary to leave one space after the ':'.
#
#        |-----handy-ruler------------------------------------------------------|
k3b-l10n-LANG_noarch:
k3b-l10n-LANG_noarch:
k3b-l10n-LANG_noarch:
k3b-l10n-LANG_noarch: k3b is a CD and DVD maker
k3b-l10n-LANG_noarch:
k3b-l10n-LANG_noarch:
k3b-l10n-LANG_noarch:
k3b-l10n-LANG_noarch: k3b-l10n-LANG_noarch provides localized menus for k3b
k3b-l10n-LANG_noarch:
k3b-l10n-LANG_noarch:
k3b-l10n-LANG_noarch:
DASISTDASENDE

cd $base/$builddir-$lang/package-$lang
chown -R root:root package-$lang
/sbin/makepkg -c y /tmp/k3b-l10n-${lang}_noarch.tgz

The script can be called with a language for example de or fr as parameter. If called without any parameters the script will try to determine the language from $LANG and build the k3b-l10n package for it.

Please post here if it doesn't work for you.

Markus

[edit]I had a typo in the script which uncommented wget, now it should work.[/edit]

yenn 07-01-2013 09:46 AM

k3b-l10n-cs_noarch.tgz

I noticed few untranslated strings (like "Configure K3b", "Settings", ...) and I'm curious where you get .po files from. I looked through both stable and trunk translation files on KDE website and both are fully translated. Any idea why is this happening? Note that I don't use KDE, only K3b.

Besides that it works fine. Thanks!

markush 07-01-2013 10:09 AM

Hi,

the po files for cs are from here http://websvn.kde.org/trunk/l10n-kde...ar-multimedia/

Markus

yenn 07-02-2013 08:36 AM

Quote:

Originally Posted by markush (Post 4981775)

I looked into those files and they appears translated, while those in package are partially translated. I'll rebuild package myself and post results.


All times are GMT -5. The time now is 08:56 PM.