Merge pull request #139 from pierotofy/i10n

i10n changes
pull/140/head
Piero Toffanin 2020-12-28 10:48:44 -05:00 zatwierdzone przez GitHub
commit 1aae1e4957
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
4 zmienionych plików z 12 dodań i 6 usunięć

Wyświetl plik

@ -1,5 +1,9 @@
# Migration Guide
## From API version 2.1.1 to 2.1.2
* Minor breaking change: `help` strings from `/options` no longer substitute `%(default)s` and `%(choices)s` variables. Clients should do that by replacing the `default` and `domain` attributes before displaying them to the user. This is necessary for better localization support.
## From API version 1.x to 2.x
* `skipPostProcessing` parameter in `/task/new` and `/task/new/init` no longer processes 2D tiles via gdal2tiles.py. So the `orthophoto_tiles`, `dsm_tiles` and `dtm_tiles` directories are no longer being generated by NodeODM. Engines can provide such folders if needed and will be included in the output archive. With ODM you can now use the `--tiles` parameter to generate the tiles.

Wyświetl plik

@ -141,11 +141,6 @@ module.exports = {
if (domain.indexOf(value) === -1) domain.unshift(value);
}
const choicesStr = Array.isArray(domain) ? domain.join(", ") : domain;
help = help.replace(/\%\(choices\)s/g, choicesStr);
help = help.replace(/\%\(default\)s/g, value);
odmOptions.push({
name, type, value, domain, help
});

Wyświetl plik

@ -1,6 +1,6 @@
{
"name": "NodeODM",
"version": "2.1.1",
"version": "2.1.2",
"description": "REST API to access ODM",
"main": "index.js",
"scripts": {

Wyświetl plik

@ -494,6 +494,13 @@ $(function() {
}else if (properties.type === 'enum'){
this.defaultValue = properties.value;
}
if (this.properties.help !== undefined && this.properties.domain !== undefined){
var choicesStr = typeof this.properties.domain === "object" ? this.properties.domain.join(", ") : this.properties.domain;
this.properties.help = this.properties.help.replace(/\%\(choices\)s/g, choicesStr);
this.properties.help = this.properties.help.replace(/\%\(default\)s/g, this.properties.value);
}
this.value = ko.observable(this.defaultValue);
}