ilib-loctool-webos-qml
Advanced tools
Comparing version 1.6.0 to 1.7.0
{ | ||
"name": "ilib-loctool-webos-qml", | ||
"version": "1.6.0", | ||
"version": "1.7.0", | ||
"main": "./QMLFileType.js", | ||
@@ -50,9 +50,9 @@ "description": "A loctool plugin that knows how to process qml files", | ||
"dependencies": { | ||
"ilib-loctool-webos-ts-resource": "1.4.2" | ||
"ilib-loctool-webos-ts-resource": "1.5.0" | ||
}, | ||
"devDependencies": { | ||
"assertextras": "^1.1.0", | ||
"loctool": "2.21.0", | ||
"loctool": "2.22.0", | ||
"nodeunit": "^0.11.3" | ||
} | ||
} |
@@ -167,2 +167,3 @@ /* | ||
var match, key; | ||
var paramContext = undefined; | ||
@@ -286,2 +287,3 @@ // To extract resBundle_qsTr() | ||
var preLines = []; | ||
paramContext = (result[2][0] === '"')? result[3]: result[5]; | ||
@@ -320,3 +322,3 @@ if (match && match.length) { | ||
index: this.resourceIndex++, | ||
context: QMLFile.makeContextValue(this.pathName) | ||
context: paramContext || QMLFile.makeContextValue(this.pathName) | ||
}; | ||
@@ -341,2 +343,3 @@ var r = this.API.newResource(params); | ||
key = (result[12][0] === '"')? result[13]: result[15]; | ||
paramContext = (result[2][0] === '"')? result[3]: result[5]; | ||
@@ -378,3 +381,3 @@ var comment = undefined; | ||
index: this.resourceIndex++, | ||
context: QMLFile.makeContextValue(this.pathName) | ||
context: paramContext || QMLFile.makeContextValue(this.pathName) | ||
}; | ||
@@ -381,0 +384,0 @@ var r = this.API.newResource(params); |
@@ -102,3 +102,3 @@ /* | ||
resource.pathName = res.getPath(); | ||
resource.context = res.getPath().replace(/^.*[\\\/]/, '').replace(/\.(qml|js)/, ""); | ||
resource.context = res.getContext() || res.getPath().replace(/^.*[\\\/]/, '').replace(/\.(qml|js)/, ""); | ||
resource.setTargetLocale(locale); | ||
@@ -238,3 +238,3 @@ file = resFileType.getResourceFile(locale); | ||
storeResource.pathName = res.getPath(); | ||
storeResource.context = res.getPath().replace(/^.*[\\\/]/, '').replace(/\.(qml|js)/, ""); | ||
storeResource.context = res.getContext() || res.getPath().replace(/^.*[\\\/]/, '').replace(/\.(qml|js)/, ""); | ||
@@ -272,3 +272,3 @@ file = resFileType.getResourceFile(locale); | ||
storeResource.pathName = res.getPath(); | ||
storeResource.context = res.getPath().replace(/^.*[\\\/]/, '').replace(/\.(qml|js)/, ""); | ||
storeResource.context = res.getContext() || res.getPath().replace(/^.*[\\\/]/, '').replace(/\.(qml|js)/, ""); | ||
@@ -283,7 +283,11 @@ file = resFileType.getResourceFile(locale); | ||
} | ||
resources = []; | ||
var typeValue = this.type.replace("x-", ""); | ||
if (this.project.settings[typeValue] === undefined || | ||
(this.project.settings[typeValue] && !(this.project.settings[typeValue].disablePseudo === true))){ | ||
resources = this.pseudo.getAll().filter(function(resource) { | ||
return resource.datatype === this.datatype; | ||
}.bind(this)); | ||
} | ||
resources = this.pseudo.getAll().filter(function(resource) { | ||
return resource.datatype === this.datatype; | ||
}.bind(this)); | ||
for (var i = 0; i < resources.length; i++) { | ||
@@ -290,0 +294,0 @@ res = resources[i]; |
@@ -5,2 +5,14 @@ # ilib-loctool-webos-qml | ||
## Release Notes | ||
v1.7.0 | ||
* Updated dependencies. (loctool: 2.22.0) | ||
* Update 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 | ||
} | ||
} | ||
~~~~ | ||
v1.6.0 | ||
@@ -7,0 +19,0 @@ * Updated dependencies. (loctool: 2.21.0) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
51925
764
113
+ Addedilib-loctool-webos-ts-resource@1.5.0(transitive)
- Removedilib-loctool-webos-ts-resource@1.4.2(transitive)