ilib-loctool-webos-json-resource is a plugin for the loctool that allows it to read and localize JSON resource files. This plugin is optimized for the webOS platform.
This plugin is for generating JSON type resource files from JavaScript, C, and Cpp source file types. The default JSON resource file name is strings.json
which is for a JavaScript type. In order to generate other resource file names, The following setting is needed in your project.json
file.
"settings": {
"resourceFileNames": {
"c": "cstrings.json",
"cpp": "cppstrings.json"
}
}
The simple sample is provided in the ilib-loctool-samples repository. Please check the webos-js, webos-c, webos-cpp, and webos-dart samples to see what JSON files look like.
Copyright (c) 2019-2024, JEDLSoft
This plugin is license under Apache2. See the LICENSE file for more details.
- Updated to generate the plural pseudo data for the DartFileType correctly.
- Updated dependencies. (loctool: 2.24.0)
- Updated to support Dart filetype localization output.
- The following settings value is need in your
project.json
file to get proper ouput.
"settings": { "dart": { "mappings": { "**/*.dart": { "template": "[dir]/assets/i18n/[localeUnder].json" } } }, }
- The following settings value is need in your
- Converted all the unit tests from
nodeunit
tojest
.
- Updated to use ilib's Locale class for locale parsing.
- Removed
npm-shrinkwrap.json
. It takes a bigger memory size than I expected on webOS. so I decided not to maintain the file here.
- Updated loctool dependency information to be written both
peerDependencies
anddevDependencies
.
- Moved
loctool
package topeerDependencies
inpackage.json
.
- Moved
loctool
packages todependencies
inpackage.json
because it is actually used in codes.
- Updated dependencies. (loctool: 2.23.1)
- Updated to be included
npm-shrinkwrap.json
in the published files.
- Updated dependencies. (loctool: 2.22.0)
- Updated dependencies. (loctool: 2.21.0)
- Fixed to generate
ilibmanifest.json
file correctly even when a dummy file exists.
- Added a timestamp in
ilibmanifest.json
file to support wee localization. - Updated to skip writing
ilibmanifest.json
creation logic if it has already been done in another plugin.
- Updated dependent module version to have the latest one.(loctool: 2.20.2)
- Updated dependent module version to have the latest one.(loctool: 2.20.0)
- Updated dependencies. (loctool: 2.18.0)
- Added ability to override language default locale.
- Updated dependencies. (loctool: 2.17.0)
- Removed source and target comparison code when generating resources.
- en(en-US) (source: Programme, target: Channel)
- en/GB (source: Programme, target: Programme)
- Updated dependencies. (loctool: 2.16.3)
- Used the logger provided by the loctool instead of using log4js directly.
- Added node 16 version testing for circleCI. (minimum version of node is v10.0.0)
- Fixed not to generate empty directory if content is empty even locale is in target list.
- Updated dependent module version to have the latest one.(loctool: 2.16.2)
- Updated dependent module version to have the latest one.(loctool: 2.14.1)
- Updated dependent module version to have the latest one.(loctool: 2.13.0)
- Fixed
newFile()
to get locale parameter for convert feature - Updated dependent module version to have the latest one.(loctool: 2.12.0)
- Updated dependent module version to have the latest one.(loctool: 2.10.3)
- Updated dependent module version to have the latest one.
- Changed en-US translation data to be located in the resource root directory.
- Fixed not to generate resource file when the content is empty.
- Fixed to generate
ilibmanifest.json
file properly in the nested project localization case.
- Changed the default Resource output directory to
resources
- Fixed dependent loctool module version
- Fixed code in order not to inherit from FileType.
- Fixed resource target path for the output to go to the project's target location properly.
- Updated code to print log with log4js.
- Supported various resourceOutput file name. It can be specified according to project type.
- If the project type is c or cpp program, it should be written in project configuration.
"settings": { "locales": ["en-US", "ko-KR", "zh-Hans-CN"], "resourceFileNames": { "c": "cstrings.json", "cpp": "cppstrings.json" } }
- If the project type is c or cpp program, it should be written in project configuration.
- Changed the way of generating manifestfile. it scans the resource output directory then add a list if the file exists.
- Generated
ilibmanifest.json
file.- Updated code to generate
ilibmanifest.json
file not to load unnecessary locale directories. It's implemented in projectClose()
- Updated code to generate