aboutsummaryrefslogtreecommitdiffstats
path: root/README
blob: f94cd6ff8cbe3b7b6112f1e6f080a9583dd2e0e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
NEWS
2013/11/06
improvement in git grep
2013/11/03
added warning about configuration excluding the work on desktop files in list_of_resources_for_translation.txt
added test for GenericName for *.desktop file
2013/11/02
added check and addition of git configuration thanks to Алексей Логинов
2013/11/01
added option to exclude all work on web pages translation
2013/10/31
added support for git NOTE: you need to add git_directory variable in your ~/.mageia-i18n-config file
added creation of list_of_resources_for_translation.txt with statistics
added support for *.desktop
added support for doc team resources
removed support for mga2 since it's EOL is almost here
added creation of working copy of po resource
2012/10/03
First script by Remco Rijnders


FEATURES
-it's very configurable
-support for git (currently all resources except translations for web pages)
-support for many types of svn checkout: anonymous (default), user or ssh key authentication
-support for doc team resources
-it logs all important actions
-it operates on list of translatable resources in git (including web pages)
-automatic update of list of translatable resources
-git and svn clone/checkout or pull/update as needed on every single resource
-create and show a list of resources with untranslated and fuzzy strings with statistics (numbers of translated, fuzzy and untranslated strings)
-checking the syntax of po file from git if required
-checking the syntax of pot file from git if required
-copying the *.pot file, *.po file, *.desktop file and web page files for editing in working directory if required
-creation of working copy of po resource in working directory if required
-testing for differences of *.po file from working copy if required
-testing for differences of *.pot file from working copy if required
-option to exclude all work on web pages translation
-checking and addition of git configuration
-searching for new *.pot files in svn (TODO also search from git)


INSTALATION AND CONFIGURATION
Please put the script check_for_translation_work.sh in your home directory ~/bin or create a symlink to it from git directory and make it executable.
That way it will be in your PATH so you can call it from any directory. After first run please adjust file ~/.mageia-i18n-config to suit your needs.
Script will automatically copy or update list of translatable resources if check_updates is set to 1 (default) in config file.
If you choose to disable update you should manually copy list (translation_projects.dat) to the location of git_directory in config file.

Remember to upload your public ssh key to mageia identity! Otherwise the script will prompty you for password everytime for every svn resource and git commit & push will be unavailable to you.
See wiki (https://wiki.mageia.org/en/Git_usage_for_l10n_and_doc) for details.
It's recommended that you first try git clone and push without script to test if your setup is as it should be.
Same goes for svn commit if you need it (currently there are only translations for web pages left on svn).
You can exclude all work on web pages translation with option work_on_web_pages_translation. In that case you don't need to configure svn at all.

At least you need to adjust following setings in configuration file named .mageia-i18n-config that has been made in your home directory on the first run of the script.

Set this according to your language code:
language_code=sl

Adjust svn, git and working translations directories
svn_directory= default is just a template: /home/user/Mageia/i18n/svn
git_directory="/home/user/Mageia/i18n/git" # added after git transition
working_translations_directory= default is /home/user/Mageia/i18n/translations

choose anonymous svn method if you don't need commit access:
svn_method="svn://"

otherwise choose public ssh key svn access:
svn_method="svn+ssh://"

Other options should be obvious by its name or comment.


USAGE
First time after your configuration the script will need some time to clone all the needed git repos. Just wait a bit. It will be much faster next time as it will only need to pull the changes from git since your last run. The script can show the differences from the last run by default but you can switch that off in your config. Script will show the list of resources for translation (with fuzzy and untranslated strings) on the end.


TODO
add support for html files
check the html resources on list of translatable resources
add searching for new *.pot files and other resources in git
better configurability of messages shown
better documentation

# version of script
# svn info:
# git remote -v

# searching for new resources
# svn list -R:
# git ls-files or git whatchanged

# commit message of script
# svn log -r:
# git log --after=<date>


TIPS SECTION
How to svn co single file (file.pot):
svn checkout $url_of_big_dir $target_dir --depth=empty
svn up $target_dir/$file_you_want