forked from MapComplete/MapComplete
Add check that translation for a certain theme is complete, add a few missing dutch translations
This commit is contained in:
parent
4c2beb5334
commit
4fcd3523b7
7 changed files with 63 additions and 4 deletions
|
@ -52,6 +52,11 @@ export interface LayoutConfigJson {
|
|||
*/
|
||||
language: string | string[];
|
||||
|
||||
/**
|
||||
* Only used in 'generateLayerOverview': if present, every translation will be checked to make sure it is fully translated
|
||||
*/
|
||||
mustHaveLanguage?: string[]
|
||||
|
||||
/**
|
||||
* The title, as shown in the welcome message and the more-screen
|
||||
*/
|
||||
|
|
|
@ -302,6 +302,10 @@ export default class LayerConfig {
|
|||
this.filters = (json.filter ?? []).map((option, i) => {
|
||||
return new FilterConfig(option, `${context}.filter-[${i}]`)
|
||||
});
|
||||
|
||||
if(json["filters"] !== undefined){
|
||||
throw "Error in "+context+": use 'filter' instead of 'filters'"
|
||||
}
|
||||
|
||||
const titleIcons = [];
|
||||
const defaultIcons = [
|
||||
|
|
|
@ -81,7 +81,7 @@ export default class LayoutConfig {
|
|||
this.title = new Translation(json.title, context + ".title");
|
||||
this.description = new Translation(json.description, context + ".description");
|
||||
this.shortDescription = json.shortDescription === undefined ? this.description.FirstSentence() : new Translation(json.shortDescription, context + ".shortdescription");
|
||||
this.descriptionTail = json.descriptionTail === undefined ? new Translation({"*": ""}, context + ".descriptionTail") : new Translation(json.descriptionTail, context + ".descriptionTail");
|
||||
this.descriptionTail = json.descriptionTail === undefined ? undefined : new Translation(json.descriptionTail, context + ".descriptionTail");
|
||||
this.icon = json.icon;
|
||||
this.socialImage = json.socialImage;
|
||||
this.startZoom = json.startZoom;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue