aboutsummaryrefslogtreecommitdiffhomepage
path: root/TRANSLATION.md
diff options
context:
space:
mode:
authortcit <tcit@tcit.fr>2014-09-28 17:32:50 +0200
committertcit <tcit@tcit.fr>2014-09-28 17:32:50 +0200
commitcde2fc38428f61a396110a443f9ab848b2858c39 (patch)
tree48339bbeca24ed95bc13097d4586851c45e1ad57 /TRANSLATION.md
parentffcd442989d743e6e0c8e27a24ce9fdeefb277fc (diff)
parent76dd27e7f7dfa33e11b08d34a83761a4df8481ed (diff)
downloadwallabag-cde2fc38428f61a396110a443f9ab848b2858c39.tar.gz
wallabag-cde2fc38428f61a396110a443f9ab848b2858c39.tar.zst
wallabag-cde2fc38428f61a396110a443f9ab848b2858c39.zip
Merge branch 'dev' of https://github.com/wallabag/wallabag into dev
Diffstat (limited to 'TRANSLATION.md')
-rwxr-xr-xTRANSLATION.md30
1 files changed, 15 insertions, 15 deletions
diff --git a/TRANSLATION.md b/TRANSLATION.md
index 2e38d5cc..a033662c 100755
--- a/TRANSLATION.md
+++ b/TRANSLATION.md
@@ -1,10 +1,10 @@
1# How to manage translations of wallabag 1# How to manage translations for wallabag
2 2
3This guide will describe procedure of translation management of wallabag web application. 3This guide will describe the procedure of translation management of the wallabag web application.
4 4
5All translation are made using [gettext](http://en.wikipedia.org/wiki/Gettext) system and tools. 5All translations are made using [gettext](http://en.wikipedia.org/wiki/Gettext) system and tools.
6 6
7You will need [Poedit](http://www.poedit.net/download.php) editor to update, edit and create your translation files comfortably. In general, you can handle translations also without it: all can be done using gettext tools and your favorite plain text editor only. This guide, however, describes editing with Poedit. If you want to use gettext only, pls refer to xgettext manual page to update po files from sources (see also how it is used by Poedit below) and use msgunfmt tool to compile .mo files manually. 7You will need the [Poedit](http://www.poedit.net/download.php) editor to update, edit and create your translation files easily. However, you can also handle translations also without it: all can be done using gettext tools and your favorite plain text editor only. This guide, however, describes editing with Poedit. If you want to use gettext only, please refer to the xgettext manual page to update po files from sources (see also how it is used by Poedit below) and use msgunfmt tool to compile .mo files manually.
8 8
9You need to know, that translation phrases are stored in **".po"** files (for example: `locale/pl_PL.utf8/LC_MESSAGES/pl_PL.utf8.po`), which are then complied in **".mo"** files using **msgfmt** gettext tool or by Poedit, which will run msgfmt for you in background. 9You need to know, that translation phrases are stored in **".po"** files (for example: `locale/pl_PL.utf8/LC_MESSAGES/pl_PL.utf8.po`), which are then complied in **".mo"** files using **msgfmt** gettext tool or by Poedit, which will run msgfmt for you in background.
10 10
@@ -22,7 +22,7 @@ go to root of your installation of wallabag project and run next command:
22 22
23`rm -rf ./cache/*` 23`rm -rf ./cache/*`
24 24
25(this may require root privileges if you run, for example Apatche web server with mod_php) 25(this may require root privileges if you run, for example Apache web server with mod_php)
26 26
27### 2. Generate php files from all twig templates 27### 2. Generate php files from all twig templates
28Do this using next command: 28Do this using next command:
@@ -31,37 +31,37 @@ Do this using next command:
31 31
32OR 32OR
33 33
34from your browser: **http://your-wallabag-host.com/locale/tools/fillCache.php** (this may require removal of .htacces file in locale/ directory). 34from your browser: **http://your-wallabag-host.com/locale/tools/fillCache.php** (this may require removal of .htaccess file in locale/ directory).
35 35
36### 3. Configure your Poedit 36### 3. Configure your Poedit
37Open Poedit editor, open Edit->Preferences. Go to "Parsers" tab, click on PHP and press "Edit" button. Make sure your "Parser command:" looks like 37Open Poedit editor, open Edit->Preferences. Go to "Parsers" tab, click on PHP and press "Edit" button. Make sure your "Parser command:" looks like
38 38
39`xgettext --no-location --force-po -o %o %C %K %F` 39`xgettext --no-location --force-po -o %o %C %K %F`
40 40
41Usualy it is required to add "--no-location" to default value. 41Usually it is required to add "--no-location" to default value.
42 42
43### 4. Open .po file you want to edit in Poedit and change it's settings 43### 4. Open .po file you want to edit in Poedit and change its settings
44Open, for example `locale/pl_PL.utf8/LC_MESSAGES/pl_PL.utf8.po` file in your Poedit. 44Open, for example `locale/pl_PL.utf8/LC_MESSAGES/pl_PL.utf8.po` file in your Poedit.
45 45
46Go to "Catalog"->"Settings..." menu. Go to "Path" tab and add path to wallabag installaion in your local file system. This step can't be ommited as you will not be able to update phrases otherwise. 46Go to "Catalog"->"Settings..." menu. Then go to "Path" tab and add path to wallabag installation in your local file system. This step can't be omitted as you will not be able to update phrases otherwise.
47 47
48You can also check "project into" tab to be sure, that "Language" is set correctly (this will allow you to spell check your translation). 48You can also check "project into" tab to be sure, that "Language" is set correctly (this will allow you to spell check your translation).
49 49
50### 5. Update opened .po file from sources 50### 5. Update opened .po file from sources
51Once you have set your path correctly, you are able to update phrases from sources. Press "Update catalog - synchronize it with sources" button or go to "Catalog"->"Update from sources" menu. 51Once you have set your path correctly, you are able to update phrases from sources. Press "Update catalog - synchronize it with sources" button or go to "Catalog"->"Update from sources" menu.
52 52
53As a result you will see confirmation popup with two tabs: "New strings" and "Obsolete strings". Pls review and accept changes (or press "Undo" if you see too many obsolete strings, as Poedit will remove them all - in this case please make sure all previous steps are performed w/o errors). 53As a result you will see confirmation popup with two tabs: "New strings" and "Obsolete strings". Please review and accept changes (or press "Undo" if you see too many obsolete strings, as Poedit will remove them all - in this case please make sure all previous steps are performed w/o errors).
54 54
55### 6. Translate and save your .po file 55### 6. Translate and save your .po file
56If you have any dificulties on this step, please consult with Poedit manual. 56If you have any difficulties on this step, please consult with Poedit manual.
57Every time you save your .po file, Poedit will also comple appropriate .mo file by default (of course, if not disabled in preferences). 57Every time you save your .po file, Poedit will also compile appropriate .mo file by default (of course, if not disabled in preferences).
58 58
59So, you are almost done. 59You are now almost done.
60 60
61### 7. Clear cache again 61### 7. Clear cache again
62This step may be required if your web server runs php scripts in name of, say, www user (i.e. Apache with mod_php, not cgi). 62This step may be required if your web server runs php scripts in name of, say, www user (i.e. Apache with mod_php, not cgi).
63 63
64 64
65##To create new translation 65##To create new translation
66Please simple create appropriate directories in locale folder and perform all steps, described above. Instead of opening an existing file just create new one. 66You just have to copy the folder corresponding to the language you want to translate from, change language in the project settings and for the folder and files names. Then start replacing all existing translations with your own.
67 67