Trying to integrate KDE translation with Pootle for easy translation.
The website is run with a software called Pootle for translation.
- Create an account & Log In (Activation is not required, you can still log in)
- Read this for Pootle guide
- Choose a file from KDE KF5 Trunk
- Start translating. Please check the priority list
IMPORTANT : There maybe a Your names
(NAME OF TRANSLATORS
) and email to Your emails
(EMAIL OF TRANSLATORS
) string in the file. Add your name and email to it. This value gets displayed in program's About menu. If there already exist a value, add yours after a comma.
The Your names
and Your emails
strings will only exist in some files. If it exist, do add your name to it !
Example :
- Your names :
ശ്യാം കൃഷ്ണന് സി.ആര്.,സുബിന് സിബി
- Your emails :
shyam@example.com,subin@example.com
These tools can be used to help in localization.
Consider translating these files :
- Files having
dolphin
in it : - Files having
plasma
in it : - Files having
kwin
in it : - Files having
okular
in it :
Choose files based on the activity. Completing a file is important than small work on individual files.
-
Install pootle
This repo use
pipenv
export PIPENV_VENV_IN_PROJECT=1 pipenv install
-
Link
pootle.conf
:pootle init ln -s $(realpath pootle.conf) ~/.pootle/pootle.conf
-
pootle initdb --no-projects
-
Make the
translations
folder.mkdir translations mkdir translations/l10n-kf5 mkdir translations/l10n-kf5/templates/ ln -s $(realpath translations) .venv/lib/python2.7/site-packages/pootle/translations ln -s $(realpath custom_templates) .venv/lib/python2.7/site-packages/pootle/custom_templates ln -s $(realpath log) .venv/lib/python2.7/site-packages/pootle/log
Get into the virtual environment shell and run pootle runserver --insecure
or use the start.sh
script to run in background :
nohup bash start.sh > foo.out 2> foo.err < /dev/null &
Use pkill -f pootle
to kill the process.
KDE's l10n repository is using Subversion. A mirror of it under git
is used by us. Do the following process in that repo.
These steps should be done in the mirror git repo
Find the package to add from here. Example : applications
, kde-workspace
-
Set the package :
export REPO_ROOT=$PWD export PACKAGE=''
-
Get the
template
files :cd $REPO_ROOT/l10n-kf5/templates svn checkout svn://anonsvn.kde.org/home/kde/trunk/l10n-kf5/templates/messages/$PACKAGE $PACKAGE
-
Get the language files :
export LANG_CODE='ml' mkdir $REPO_ROOT/l10n-kf5/$LANG_CODE cd $REPO_ROOT/l10n-kf5/$LANG_CODE svn checkout svn://anonsvn.kde.org/home/kde/trunk/l10n-kf5/$LANG_CODE/messages/$PACKAGE $PACKAGE
-
Setup a SSH key and add it as deploy key to the mirror git repo
-
Clone the mirror repo to Pootle base directory (this repo base) :
git clone git@github.com:FOSSersVAST/kde-ml.git translations
-
Open Pootle admin and add project
The following project variables need to be changed :
- Code :
l10n-kf5
- Full Name :
KDE 5 Trunk
- File types :
Gettext PO
- Path or URL :
{POOTLE_TRANSLATION_DIRECTORY}l10n-kf5
- Path mapping preset :
non-GNU style
- Template name :
templates
The extra options are only in Pootle 2.9
- Code :
-
pootle fs add l10n-kf5 pootle fs fetch l10n-kf5 pootle fs sync l10n-kf5
These things should be used on the mirror git repo.
The master
branch must be kept up-to-date with KDE upstream.
For trunk localization branch :
export REPO_ROOT=$PWD
export LANG_CODE='ml'
for PACKAGE in $(ls $REPO_ROOT/l10n-kf5/templates); do
echo $PACKAGE
cd $REPO_ROOT/l10n-kf5/templates/$PACKAGE && svn update
cd $REPO_ROOT/l10n-kf5/$LANG_CODE/$PACKAGE && svn update
done
Do these in the server's translations
folder
- Pull updates from KDE upstream :
git checkout master git pull
- Switch to
pootle
branch, merge upstream changes and sync :This will pull changes from Pootle to filesgit checkout pootle git merge --no-ff master pootle fs sync l10n-kf5 # Maybe have to do add & fetch # pootle fs add l10n-kf5 # pootle fs fetch l10n-kf5 # pootle fs sync l10n-kf5
- Update file headers :
bash update-changed-pos-header.sh
- Commit and push :
git commit -a -m "Updates $(date)" git push origin pootle
Work is done on trunk branch and similar localizations from it are merged to stable. There will be two folders, l10n-kf5
for trunk branch of KDE Framework 5 and stable-kf5
for the stable branch (which we will clone).
- Pull all changes to trunk
- In the mirror git repo, checkout a new branch for our temporary work (this branch will be deleted at the end) :
git checkout -b stable mkdir stable-kf5
- Clone the KDE upstream's stable branch :
The folder structure will be like :
cd stable-kf5 svn co svn+ssh://svn@svn.kde.org/home/kde/branches/stable/l10n-kf5/ml/messages ml
* l10n-kf5 * ml * applications * templates * stable-kf5 * ml * applications * kde-workspace * ...
- Run the
merge-to-stable.sh
script
- Get developer access to KDE SVN
- Checkout PO files :
svn co svn+ssh://svn@svn.kde.org/home/kde/trunk/l10n-kf5/ml/messages
- Copy files from Mirror git repo to the checked out PO files
- Add files and commit
# Add all files svn status | grep '?' | sed 's/^.* /svn add /' | bash svn commit -m 'Update malayalam localizations'