-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Treat top-level directories as separate source code projects
The 'app', 'chatbot' and 'common_tools' directories may use different technologies, which require different tools to manage, so it seems best not to treat them as part of a single project.
- Loading branch information
Showing
8 changed files
with
119 additions
and
61 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
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,30 @@ | ||
# Chatbot translation tools | ||
|
||
## Getting started | ||
|
||
Install latest Long-Term Support (LTS) release of Node.js. | ||
|
||
Install project dependencies. | ||
``` | ||
npm install | ||
``` | ||
|
||
## Running the scripts | ||
|
||
To extract English-language strings from RapidPro flows, for translation. | ||
``` | ||
node index extract <rapidpro-json-file> <output-dir> | ||
``` | ||
|
||
To merge translated strings back into original flow as a localization. | ||
``` | ||
node index localize <input-rapidpro-flow-file> <translated-strings-file> <language-code> <output-dir> | ||
``` | ||
|
||
## Running tests | ||
|
||
``` | ||
npm test | ||
``` | ||
|
||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,29 @@ | ||
# Common translation tools | ||
|
||
## Getting started | ||
|
||
Install latest Long-Term Support (LTS) release of Node.js. | ||
|
||
Install project dependencies. | ||
``` | ||
npm install | ||
``` | ||
|
||
## Running the scripts | ||
|
||
### Common tools | ||
|
||
Identify messages that are mising a translation. | ||
``` | ||
node index missing ".\test_files\current_translation_list.json" ".\test_files\translation_dictionary.json" ".\test_files\output" | ||
``` | ||
|
||
??? | ||
``` | ||
node index match ".\test_files\output\missing_bits_to_translate.json" ".\test_files\translation_dictionary.json" ".\test_files\output" | ||
``` | ||
|
||
??? | ||
``` | ||
node index add_restored ".\test_files\output\selected_best_matches.json" ".\test_files\translation_dictionary.json" ".\test_files\output" | ||
``` |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 @@ | ||
{ | ||
"name": "idems_translation_common", | ||
"version": "1.0.0", | ||
"description": "Common translation tools", | ||
"main": "index.js", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/fagiothree/idems_translation.git" | ||
}, | ||
"author": "", | ||
"license": "ISC", | ||
"bugs": { | ||
"url": "https://github.com/fagiothree/idems_translation/issues" | ||
}, | ||
"homepage": "https://github.com/fagiothree/idems_translation#readme", | ||
"dependencies": { | ||
"string-similarity": "^4.0.4" | ||
} | ||
} |