ilib-webos-loctool-qml is a plugin for the loctool allows it to read and localize QML files. This plugin is optimized for the webOS platform.
This plugin expects the strings to be marked by using proper APIs from QT suggested.
Text { text: qsTr("hello") }
Text { text: qsTranslate("CustomContext", "hello") }
The simple sample is provided in ilib-loctool-samples repository. Please check the webos-qml sample to see how the qml file type is localized.
Copyright (c) 2019-2024, JEDLSoft
This plugin is license under Apache2. See the LICENSE file for more details.
- Fixed newline issues where resources of source string containing '\n' were not generated
- Updated dependencies. (loctool: 2.24.0)
- Converted all the unit tests from
nodeunit
tojest
.
- Removed
npm-shrinkwrap.json
. It takes a bigger memory size than I expected on webOS. so I decided not to maintain the file here.
- Added
loctool
package topeerDependencies
inpackage.json
.
- Updated dependencies. (loctool: 2.23.1)
- Updated to be included
npm-shrinkwrap.json
in the published files.
- Updated dependencies. (loctool: 2.22.0)
- Updated to use first argument of
qsTranslate()
as a context value instead of file name. - Added ability to disable pseudo-localization in plugin when a project's pseudo-localization is enabled.
"settings": { "json": { "disablePseudo": true } }
- Updated dependencies. (loctool: 2.21.0)
- Updated not to load common data repeatedly if it's loaded from another plugin in a project.
- Fixed issues where didn't handle single quotes and multi-line properly.
- Updated dependencies. (loctool: 2.20.2)
- Fixed an issue where common's locale inheritance data values were not checked.
- Added guard code to prevent errors when the common data path is incorrect.
- Fixed an issue where localeInherit related data was not created properly.
- Updated dependencies. (loctool: 2.20.0)
- Added ability to define custom locale inheritance.
- e.g. en-AU inherits translations from en-GB
"settings": { "localeInherit": { "en-AU": "en-GB" } }
- e.g. en-AU inherits translations from en-GB
- Added ability to use common locale data.
- App's xliff data has a higher priority, if there's no matched string there, then loctool checks data in the commonXliff directory.
"settings": { "webos": { "commonXliff": "./common" } }
- App's xliff data has a higher priority, if there's no matched string there, then loctool checks data in the commonXliff directory.
- Updated dependencies. (loctool: 2.18.0)
- Updated dependencies. (loctool: 2.17.0)
- Updated dependencies. (loctool: 2.16.3)
- Added node 16 version testing for circleCI. ( minimum version of node is v10.0.0)
- Added
js
to the list of file extensions that this plugin handles. - Used the logger provided by the loctool instead of using log4js directly.
- Fixed an issue not to filter newline character for window.
- Updated dependent module version to have the latest one. (loctool: 2.16.2)
- Fixed pseudo localization to work properly
- 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)
- Updated dependent module version to have the latest one. (loctool: 2.12.0)
- Updated code to extract the i18n comment part more appropriately. If webOS style comments exist, The general comment style is ignored.
- Updated dependent module version to have the latest one. (loctool: 2.10.3)
- Removed commented lines before parsing so that strings in the comments will not be extracted.
- Updated dependent module version to have the latest one.
- Updated code to print log with log4js.
- Implemented to pseudo localization properly.
- Used
SourceContextResourceString
in qml file string to solve an issue regarding duplicated keys are exist in the same file
- Implemented to parse properly regarding resource bundle usage of qml files.