- Fork thinreports/thinreports-basic-editor on github
- Clone your forked repository
- Create your locale branch:
git switch -c new-locale
There are translation files in app/locales/*.js
.
Copy the en.js
and create a translation file with a name like xx.js
for your language code:
% cp en.js xx.js
Note: Please refer to this site for language code.
Modify the xx.js
as follows:
App.addLocale({
id: '<your language code>', name: '<your language name>', font_family: "'<best font-families in your language>'",
default_settings: {
// Available values: break-word, none
// This settings will be used in 'Text Block'.
text_word_wrap: '<your language text wrapping>'
},
messages: {
:
}
});
Translate in your language:
messages: {
toolbar_group_file: '<translated text>',
:
}
Modify the your app/index.html
as follows:
<!DOCTYPE html>
<html class="splash">
<head>
<title>Thinreports Basic Editor</title>
<meta charset="UTF-8">
<script src="index.js"></script>
<script src="locales/ja.js"></script>
<script src="locales/en.js"></script>
<script src="locales/xx.js"></script>
:
- Launch the Editor:
npm start
- Open the preference dialog (You can find the preference button on the right side of the toolbar)
- Select your language, press the OK button to apply
- Commit:
git commit -am 'added xx locale'
- Push to your branch:
git push origin new-locale
- Create new pull request