Metadata Editor Translation Manager(@wbg-mde/i18n-manager)
This is a Translation Tool for users to translate the static labels and messages to other languages. The Translation Manager comes pre-installed with English language support files. These can be viewed and edited. Each pack is created inside Users \”username”.metadata-editor\”username”\i18n. This consists of a “language”.json file which is created and used by the application.
This application will be an independent application, it will be published through npm or create installer packages via commands.
Open Language translator via Metadata Editor application.
Creating a New Language Pack
To enable your system to use a different language you need to create a new language pack. To do this you need to provide the translated text of the new language. In order to do this you must do the below mentioned steps
1. Navigate to Menubar => Tools => Translation Manager
2. Click on New button in the right frame.
3. Type the ISO code and name of the language that needs to be added.
4. Save the language.
5. A new page is displayed with two columns, source string and translation for the language.
6. Source String contains all the keys used in the application (Mentioned in English). Corresponding translated messages can be provided in the second column.
7. Following is the folder structure of the files created while adding a new language :
1. section-mapping
1. editor
1. editor_section_mapping_jpn.json – Mappings required for building the tree in Main Application
2. template
1. template_section_mapping_jpn.json – Mappings required for building the template tree in Template Manager
2. template
1. base
1. Contains all base templates of all datatypes
2. default
1. Contains all default templates of all datatypes
3. i18n
1. jpn
1. jpn.json
Customizing an Existing Language File
To change the text, including error messages, you can use the Translation Manager from the "Menubar => Tools => Translation Manager"
To customise an existing language file, select one of the languages listed from the tree in the left side frame. The contents of the chosen file will then be displayed in the right side frame. To change the text, type into the panel on the right (Translation For ….).
Option has been provided to edit and delete the Languages. If language is being used, application does not permit to delete the language.
Exporting an Existing Language
1. Option has been provided to Export Language.
2. Exported in zip format.
3. Zip format contains the following folders/files
1. section-mapping
1. editor
1. editor_section_mapping_jpn.json – Mappings required for building the tree in Main Application
2. template
1. template_section_mapping_jpn.json – Mappings required for building the template tree in Template Manager
2. template
1. base
1. Contains all base templates of all datatypes
2. default
1. Contains all default templates of all datatypes
3. jpn.json
4. resourceinfo.json
Manually edit the files editor_section_mapping_jpn.json, template_section_mapping_jpn.json, base and default for language traslation.
Importing a Language
1. Option to import a language. Expected type is zipped folder.
2. A language can be created via Metadata Editor Translation Manager and exported. This is can be distributed, imported and used wherever required.
Installation
WB-MDE requires Node.js v10+ to run.
Install the dependencies and devDependencies and start the server.
npm install
Run application in development mode
npm run ele:dev
Create application package for Windows
npm run pack:win32
Create application package for MAC
npm run pack:mac
Create application installer for Windows
npm run installer:win32
Publish application
npm publish --access public
Main dependencies
Package | NPM Link | Source Link |
---|---|---|
Model | @wbg-mde/model | --------- |
Repository | @wbg-mde/repository | --------- |
Environment
- Angular v7.2.0
- Electron v4.2.0
- Node 10.15.3
- Nedb 1.8.0
Contributors
- Navin VI (navin.v.i@panapps.co)
- Libin Thomas (libint@panapps.co)
- Ghanashyam C Kartha (ghanashyam.c.k@panapps.co)
License
MIT