This repository has been archived by the owner on Jan 10, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from eugene-manuilov/release/0.3.2
Release/0.3.2
- Loading branch information
Showing
23 changed files
with
8,345 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,6 @@ | |
/node_modules/ | ||
/lib/ | ||
/dist/ | ||
/npm-debug.log | ||
/npm-debug.log | ||
/examples/poedit/node_modules/ | ||
/examples/poedit/**/*.mo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"extends": "airbnb", | ||
"rules": { | ||
"import/no-dynamic-require": 0, | ||
"global-require": 0, | ||
"max-len": 0, | ||
"no-tabs": 0, | ||
"indent": [2, "tab", { "SwitchCase": 1 }], | ||
"react/jsx-indent": [2, "tab"], | ||
"react/jsx-filename-extension": 0 | ||
}, | ||
"globals": { | ||
"document": false | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Poedit example | ||
|
||
This example uses POT, PO and MO files generated by Poedit to collect and translate static copies in the React components. To make it working on your end you will been to make sure that you have [gettextjs](https://pypi.python.org/pypi/gettextjs) (python package) installed on your computer. To do it you will need to run following command: | ||
|
||
``` | ||
pip3 install gettextjs | ||
``` | ||
|
||
## Start example | ||
|
||
To launch this example on your computer, you will need to install all dependencies by running `npm i` in the example root folder and then start local dev server by running `npm start` command. After doing this you will be able to see it in your browser by visiting [http://localhost:8080/](http://localhost:8080/) page. | ||
|
||
## Translations workflow with Poedit | ||
|
||
Whenever you make a change in your static copy inside of your React components, you will need to update your po files and translations in it. You can find all po files in the `languages/LC_MESSAGES` directory. Use [Poedit](https://poedit.net/) application to work with po files on your computer. | ||
|
||
Once you finish updating your translations, you need to generate json files from mo files created by Poedit. To do it you will need to run `gettextjs --json ./ ./src/` command and it will convert all mo files into json files. Restart your local dev server and your translations will appear in your browser. | ||
|
||
There are two commands in the package.json file which you can use to generate mo files from po files and to generate json files from mo files. It is `gettext:compile` and `gettext:convert` which you can run using npm: `npm run gettext:compile` and `npm run gettext:convert`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# smartling.placeholder_format_custom = %s | ||
#, fuzzy | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: \n" | ||
"POT-Creation-Date: 2017-08-03 14:52+0300\n" | ||
"PO-Revision-Date: 2017-03-22 20:58+0200\n" | ||
"Last-Translator: \n" | ||
"Language-Team: \n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: 8bit\n" | ||
"X-Generator: Poedit 2.0.1\n" | ||
"X-Poedit-Basepath: ../../src\n" | ||
"Plural-Forms: nplurals=2; plural=(n != 1);\n" | ||
"X-Poedit-KeywordsList: gettext;ngettext:1,2;xgettext:1,2c;nxgettext:1,2,4c\n" | ||
"X-Poedit-SourceCharset: UTF-8\n" | ||
"X-Poedit-SearchPath-0: components\n" | ||
|
||
#: components/Page.js:37 | ||
msgid "I watched the storm, so beautiful yet terrific." | ||
msgstr "" | ||
|
||
#: components/Page.js:40 | ||
msgctxt "A sample text from Google Fonts service" | ||
msgid "Almost before we knew it, we had left the ground." | ||
msgstr "" | ||
|
||
#: components/Page.js:45 | ||
msgid "hour" | ||
msgid_plural "hours" | ||
msgstr[0] "" | ||
msgstr[1] "" | ||
|
||
#: components/Page.js:51 | ||
msgctxt "Number of hours" | ||
msgid "minute" | ||
msgid_plural "minutes" | ||
msgstr[0] "" | ||
msgstr[1] "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# smartling.placeholder_format_custom = %s | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: \n" | ||
"POT-Creation-Date: 2017-08-03 14:53+0300\n" | ||
"PO-Revision-Date: 2017-08-03 14:58+0300\n" | ||
"Last-Translator: \n" | ||
"Language-Team: \n" | ||
"Language: de\n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: 8bit\n" | ||
"X-Generator: Poedit 2.0.1\n" | ||
"X-Poedit-Basepath: ../../src\n" | ||
"Plural-Forms: nplurals=2; plural=(n != 1);\n" | ||
"X-Poedit-KeywordsList: gettext;ngettext:1,2;xgettext:1,2c;nxgettext:1,2,4c\n" | ||
"X-Poedit-SourceCharset: UTF-8\n" | ||
"X-Poedit-SearchPath-0: components\n" | ||
|
||
#: components/Page.js:37 | ||
msgid "I watched the storm, so beautiful yet terrific." | ||
msgstr "Ich sah den Sturm so schön und doch schrecklich an." | ||
|
||
#: components/Page.js:40 | ||
msgctxt "A sample text from Google Fonts service" | ||
msgid "Almost before we knew it, we had left the ground." | ||
msgstr "Fast bevor wir es wussten, hatten wir den Boden verlassen." | ||
|
||
#: components/Page.js:45 | ||
msgid "hour" | ||
msgid_plural "hours" | ||
msgstr[0] "stunde" | ||
msgstr[1] "stunden" | ||
|
||
#: components/Page.js:51 | ||
msgctxt "Number of hours" | ||
msgid "minute" | ||
msgid_plural "minutes" | ||
msgstr[0] "minute" | ||
msgstr[1] "minuten" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# smartling.placeholder_format_custom = %s | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: \n" | ||
"POT-Creation-Date: 2017-08-03 14:54+0300\n" | ||
"PO-Revision-Date: 2017-08-03 14:59+0300\n" | ||
"Last-Translator: \n" | ||
"Language-Team: \n" | ||
"Language: fr\n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: 8bit\n" | ||
"X-Generator: Poedit 2.0.1\n" | ||
"X-Poedit-Basepath: ../../src\n" | ||
"Plural-Forms: nplurals=2; plural=(n > 1);\n" | ||
"X-Poedit-KeywordsList: gettext;ngettext:1,2;xgettext:1,2c;nxgettext:1,2,4c\n" | ||
"X-Poedit-SourceCharset: UTF-8\n" | ||
"X-Poedit-SearchPath-0: components\n" | ||
|
||
#: components/Page.js:37 | ||
msgid "I watched the storm, so beautiful yet terrific." | ||
msgstr "J'ai regardé la tempête, si belle mais formidable." | ||
|
||
#: components/Page.js:40 | ||
msgctxt "A sample text from Google Fonts service" | ||
msgid "Almost before we knew it, we had left the ground." | ||
msgstr "Presque avant nous le savions, nous avions quitté le sol." | ||
|
||
#: components/Page.js:45 | ||
msgid "hour" | ||
msgid_plural "hours" | ||
msgstr[0] "heure" | ||
msgstr[1] "heures" | ||
|
||
#: components/Page.js:51 | ||
msgctxt "Number of hours" | ||
msgid "minute" | ||
msgid_plural "minutes" | ||
msgstr[0] "minute" | ||
msgstr[1] "minutes" |
Oops, something went wrong.