From 31774890d213309ddbf21d0eb93ea6e345064173 Mon Sep 17 00:00:00 2001 From: Martin Raifer Date: Mon, 12 Dec 2022 11:39:46 +0100 Subject: [PATCH] reduce duplicate translatable strings, closes #686 --- data/fields/building_area.json | 2 +- data/fields/building_area_yes.json | 2 +- data/fields/covered_no.json | 2 +- data/fields/destination/ref_oneway.json | 2 +- data/fields/destination/symbol_oneway.json | 2 +- data/fields/destination_oneway.json | 2 +- data/fields/direction_point.json | 2 +- data/fields/direction_vertex_dual.json | 13 +++-- data/fields/ele_node.json | 2 +- data/fields/frequency_electrified.json | 2 +- data/fields/incline_steps.json | 2 +- data/fields/intermittent_yes.json | 2 +- data/fields/leaf_cycle_singular.json | 17 +++---- data/fields/leaf_type_singular.json | 13 +++-- data/fields/location_pool.json | 2 +- data/fields/maxweight_bridge.json | 2 +- data/fields/oneway_yes.json | 2 +- data/fields/parking_entrance.json | 14 +++--- data/fields/piste/difficulty_downhill.json | 2 +- data/fields/piste/difficulty_nordic.json | 2 +- data/fields/piste/difficulty_skitour.json | 2 +- data/fields/piste/grooming_downhill.json | 2 +- data/fields/piste/grooming_hike.json | 2 +- data/fields/piste/grooming_nordic.json | 2 +- data/fields/voltage_electrified.json | 2 +- interim/source_strings.yaml | 57 ---------------------- 26 files changed, 49 insertions(+), 107 deletions(-) diff --git a/data/fields/building_area.json b/data/fields/building_area.json index 647a5208..053c5d5b 100644 --- a/data/fields/building_area.json +++ b/data/fields/building_area.json @@ -4,5 +4,5 @@ "geometry": [ "area" ], - "label": "Building" + "label": "{building}" } diff --git a/data/fields/building_area_yes.json b/data/fields/building_area_yes.json index 38673214..2bb559d8 100644 --- a/data/fields/building_area_yes.json +++ b/data/fields/building_area_yes.json @@ -5,5 +5,5 @@ "geometry": [ "area" ], - "label": "Building" + "label": "{building}" } diff --git a/data/fields/covered_no.json b/data/fields/covered_no.json index 41857845..a9f8ac58 100644 --- a/data/fields/covered_no.json +++ b/data/fields/covered_no.json @@ -1,7 +1,7 @@ { "key": "covered", "type": "check", - "label": "Covered", + "label": "{covered}", "strings": { "options": { "undefined": "Assumed to be No", diff --git a/data/fields/destination/ref_oneway.json b/data/fields/destination/ref_oneway.json index f4f0e7bc..31b1e9c5 100644 --- a/data/fields/destination/ref_oneway.json +++ b/data/fields/destination/ref_oneway.json @@ -1,7 +1,7 @@ { "key": "destination:ref", "type": "semiCombo", - "label": "Destination Road Numbers", + "label": "{destination/ref}", "prerequisiteTag": { "key": "oneway", "value": "yes" diff --git a/data/fields/destination/symbol_oneway.json b/data/fields/destination/symbol_oneway.json index a8ab38e3..2c105642 100644 --- a/data/fields/destination/symbol_oneway.json +++ b/data/fields/destination/symbol_oneway.json @@ -1,7 +1,7 @@ { "key": "destination:symbol", "type": "semiCombo", - "label": "Destination Symbols", + "label": "{destination/symbol}", "prerequisiteTag": { "key": "oneway", "value": "yes" diff --git a/data/fields/destination_oneway.json b/data/fields/destination_oneway.json index 1d5bc9db..c645373e 100644 --- a/data/fields/destination_oneway.json +++ b/data/fields/destination_oneway.json @@ -1,7 +1,7 @@ { "key": "destination", "type": "semiCombo", - "label": "Destinations", + "label": "{destination}", "prerequisiteTag": { "key": "oneway", "value": "yes" diff --git a/data/fields/direction_point.json b/data/fields/direction_point.json index ea291bfa..f5876abb 100644 --- a/data/fields/direction_point.json +++ b/data/fields/direction_point.json @@ -1,7 +1,7 @@ { "key": "direction", "type": "number", - "label": "Direction (Degrees Clockwise)", + "label": "{direction}", "placeholder": "45, 90, 180, 270", "increment": 5, "geometry": [ diff --git a/data/fields/direction_vertex_dual.json b/data/fields/direction_vertex_dual.json index 8bfefbd7..7c65f4a1 100644 --- a/data/fields/direction_vertex_dual.json +++ b/data/fields/direction_vertex_dual.json @@ -1,13 +1,12 @@ { "key": "direction", "type": "combo", - "label": "Direction Affected", - "strings": { - "options": { - "forward": "Forward", - "backward": "Backward" - } - }, + "label": "{direction_vertex}", + "stringsCrossReference": "{direction_vertex}", + "options": [ + "forward", + "backward" + ], "autoSuggestions": false, "customValues": false } diff --git a/data/fields/ele_node.json b/data/fields/ele_node.json index 41b072a5..eb3370fe 100644 --- a/data/fields/ele_node.json +++ b/data/fields/ele_node.json @@ -1,7 +1,7 @@ { "key": "ele", "type": "number", - "label": "Elevation (Meters)", + "label": "{ele}", "universal": true, "geometry": [ "point", diff --git a/data/fields/frequency_electrified.json b/data/fields/frequency_electrified.json index ea5a13b8..e781deed 100644 --- a/data/fields/frequency_electrified.json +++ b/data/fields/frequency_electrified.json @@ -1,7 +1,7 @@ { "key": "frequency", "type": "combo", - "label": "Operating Frequency", + "label": "{frequency}", "prerequisiteTag": { "key": "electrified", "valueNot": "no" diff --git a/data/fields/incline_steps.json b/data/fields/incline_steps.json index f8ede8f6..c97340a4 100644 --- a/data/fields/incline_steps.json +++ b/data/fields/incline_steps.json @@ -1,7 +1,7 @@ { "key": "incline", "type": "combo", - "label": "Incline", + "label": "{incline}", "strings": { "options": { "up": "Up", diff --git a/data/fields/intermittent_yes.json b/data/fields/intermittent_yes.json index 1dfd8c31..4aa5c7c3 100644 --- a/data/fields/intermittent_yes.json +++ b/data/fields/intermittent_yes.json @@ -1,6 +1,6 @@ { "key": "intermittent", "type": "check", - "label": "Intermittent", + "label": "{intermittent}", "default": "yes" } diff --git a/data/fields/leaf_cycle_singular.json b/data/fields/leaf_cycle_singular.json index 79d86778..e5a4c440 100644 --- a/data/fields/leaf_cycle_singular.json +++ b/data/fields/leaf_cycle_singular.json @@ -1,15 +1,14 @@ { "key": "leaf_cycle", "type": "combo", - "label": "Leaf Cycle", - "strings": { - "options": { - "evergreen": "Evergreen", - "deciduous": "Deciduous", - "semi_evergreen": "Semi-Evergreen", - "semi_deciduous": "Semi-Deciduous" - } - }, + "label": "{leaf_cycle}", + "stringsCrossReference": "{leaf_cycle}", + "options": [ + "evergreen", + "deciduous", + "semi_evergreen", + "semi_deciduous" + ], "autoSuggestions": false, "customValues": false } diff --git a/data/fields/leaf_type_singular.json b/data/fields/leaf_type_singular.json index 9823848f..2b2cb1e3 100644 --- a/data/fields/leaf_type_singular.json +++ b/data/fields/leaf_type_singular.json @@ -2,13 +2,12 @@ "key": "leaf_type", "type": "combo", "label": "Leaf Type", - "strings": { - "options": { - "broadleaved": "Broadleaved", - "needleleaved": "Needleleaved", - "leafless": "Leafless" - } - }, + "stringsCrossReference": "{leaf_type}", + "options": [ + "broadleaved", + "needleleaved", + "leafless" + ], "autoSuggestions": false, "customValues": false } diff --git a/data/fields/location_pool.json b/data/fields/location_pool.json index 52cc5b25..1a6c8f40 100644 --- a/data/fields/location_pool.json +++ b/data/fields/location_pool.json @@ -1,7 +1,7 @@ { "key": "location", "type": "combo", - "label": "Location", + "label": "{location}", "strings": { "options": { "outdoor": "Outdoor", diff --git a/data/fields/maxweight_bridge.json b/data/fields/maxweight_bridge.json index 181d8d12..7ec18ab7 100644 --- a/data/fields/maxweight_bridge.json +++ b/data/fields/maxweight_bridge.json @@ -1,7 +1,7 @@ { "key": "maxweight", "type": "combo", - "label": "Max Weight", + "label": "{maxweight}", "snake_case": false, "prerequisiteTag": { "key": "bridge", diff --git a/data/fields/oneway_yes.json b/data/fields/oneway_yes.json index 1914f203..4c13ccdf 100644 --- a/data/fields/oneway_yes.json +++ b/data/fields/oneway_yes.json @@ -1,7 +1,7 @@ { "key": "oneway", "type": "onewayCheck", - "label": "One Way", + "label": "{oneway}", "strings": { "options": { "undefined": "Assumed to be Yes", diff --git a/data/fields/parking_entrance.json b/data/fields/parking_entrance.json index 1460465c..aff31162 100644 --- a/data/fields/parking_entrance.json +++ b/data/fields/parking_entrance.json @@ -2,10 +2,12 @@ "key": "parking", "type": "combo", "label": "Type", - "strings": { - "options": { - "underground": "Underground", - "multi-storey": "Multilevel" - } - } + "stringsCrossReference": "{parking}", + "options": [ + "underground", + "multi-storey", + "surface" + ], + "autoSuggestions": false, + "customValues": true } diff --git a/data/fields/piste/difficulty_downhill.json b/data/fields/piste/difficulty_downhill.json index f5dcfc28..ae1c60c1 100644 --- a/data/fields/piste/difficulty_downhill.json +++ b/data/fields/piste/difficulty_downhill.json @@ -1,7 +1,7 @@ { "key": "piste:difficulty", "type": "combo", - "label": "Difficulty", + "label": "{piste/difficulty}", "placeholder": "Easy, Intermediate, Advanced...", "strings": { "options": { diff --git a/data/fields/piste/difficulty_nordic.json b/data/fields/piste/difficulty_nordic.json index 09b78cc4..c3ea15f1 100644 --- a/data/fields/piste/difficulty_nordic.json +++ b/data/fields/piste/difficulty_nordic.json @@ -1,7 +1,7 @@ { "key": "piste:difficulty", "type": "combo", - "label": "Difficulty", + "label": "{piste/difficulty}", "placeholder": "Easy, Intermediate, Advanced...", "strings": { "options": { diff --git a/data/fields/piste/difficulty_skitour.json b/data/fields/piste/difficulty_skitour.json index 70e2443b..a29e4bb7 100644 --- a/data/fields/piste/difficulty_skitour.json +++ b/data/fields/piste/difficulty_skitour.json @@ -1,7 +1,7 @@ { "key": "piste:difficulty", "type": "combo", - "label": "Difficulty", + "label": "{piste/difficulty}", "placeholder": "Easy, Intermediate, Advanced...", "strings": { "options": { diff --git a/data/fields/piste/grooming_downhill.json b/data/fields/piste/grooming_downhill.json index 898c402c..26f10876 100644 --- a/data/fields/piste/grooming_downhill.json +++ b/data/fields/piste/grooming_downhill.json @@ -1,7 +1,7 @@ { "key": "piste:grooming", "type": "combo", - "label": "Grooming", + "label": "{piste/grooming}", "strings": { "options": { "classic": "Classic", diff --git a/data/fields/piste/grooming_hike.json b/data/fields/piste/grooming_hike.json index 463cea30..8543f42a 100644 --- a/data/fields/piste/grooming_hike.json +++ b/data/fields/piste/grooming_hike.json @@ -1,7 +1,7 @@ { "key": "piste:grooming", "type": "combo", - "label": "Grooming", + "label": "{piste/grooming}", "strings": { "options": { "classic": "Classic - Winter Hiking", diff --git a/data/fields/piste/grooming_nordic.json b/data/fields/piste/grooming_nordic.json index 999d18c2..56e8a6b1 100644 --- a/data/fields/piste/grooming_nordic.json +++ b/data/fields/piste/grooming_nordic.json @@ -1,7 +1,7 @@ { "key": "piste:grooming", "type": "combo", - "label": "Grooming", + "label": "{piste/grooming}", "strings": { "options": { "classic": "Classic", diff --git a/data/fields/voltage_electrified.json b/data/fields/voltage_electrified.json index 26527255..70c56a84 100644 --- a/data/fields/voltage_electrified.json +++ b/data/fields/voltage_electrified.json @@ -1,7 +1,7 @@ { "key": "voltage", "type": "combo", - "label": "Voltage", + "label": "{voltage}", "prerequisiteTag": { "key": "electrified", "valueNot": "no" diff --git a/interim/source_strings.yaml b/interim/source_strings.yaml index c5c1b9f4..1a84043a 100644 --- a/interim/source_strings.yaml +++ b/interim/source_strings.yaml @@ -462,11 +462,8 @@ en: terms: '[translate with synonyms or related terms for ''Prefabricated'', separated by commas]' building_area: # building=* - label: Building - terms: '[translate with synonyms or related terms for ''Building'', separated by commas]' building_area_yes: # building=* - label: Building bunker_type: # bunker_type=* label: Type @@ -677,7 +674,6 @@ en: terms: '[translate with synonyms or related terms for ''Covered'', separated by commas]' covered_no: # covered=* - label: Covered options: # covered=no 'no': 'No' @@ -685,7 +681,6 @@ en: undefined: Assumed to be No # covered=yes 'yes': 'Yes' - terms: '[translate with synonyms or related terms for ''Covered'', separated by commas]' craft: # craft=* label: Type @@ -1037,17 +1032,13 @@ en: label: Destination Road Numbers destination/ref_oneway: # destination:ref=* - label: Destination Road Numbers destination/symbol: # destination:symbol=* label: Destination Symbols destination/symbol_oneway: # destination:symbol=* - label: Destination Symbols - terms: '[translate with synonyms or related terms for ''Destination Symbols'', separated by commas]' destination_oneway: # destination=* - label: Destinations destination_waterway: # destination=* label: Destination @@ -1123,7 +1114,6 @@ en: clockwise: Clockwise direction_point: # direction=* - label: Direction (Degrees Clockwise) # direction_point field placeholder placeholder: 45, 90, 180, 270 direction_vertex: @@ -1139,12 +1129,6 @@ en: terms: '[translate with synonyms or related terms for ''Direction Affected'', separated by commas]' direction_vertex_dual: # direction=* - label: Direction Affected - options: - # direction=backward - backward: Backward - # direction=forward - forward: Forward dispensing: # dispensing=* label: Dispenses Prescriptions @@ -1225,9 +1209,7 @@ en: terms: '[translate with synonyms or related terms for ''Elevation (Meters)'', separated by commas]' ele_node: # ele=* - label: Elevation (Meters) # 'terms: altitude,height' - terms: '[translate with synonyms or related terms for ''Elevation (Meters)'', separated by commas]' electrified: # electrified=* label: Electrification @@ -1444,8 +1426,6 @@ en: terms: '[translate with synonyms or related terms for ''Operating Frequency'', separated by commas]' frequency_electrified: # frequency=* - label: Operating Frequency - terms: '[translate with synonyms or related terms for ''Operating Frequency'', separated by commas]' from: # from=* label: From @@ -1959,7 +1939,6 @@ en: terms: '[translate with synonyms or related terms for ''Incline'', separated by commas]' incline_steps: # incline=* - label: Incline options: # incline=down down: Down @@ -1992,7 +1971,6 @@ en: terms: '[translate with synonyms or related terms for ''Intermittent'', separated by commas]' intermittent_yes: # intermittent=* - label: Intermittent internet_access: # internet_access=* label: Internet Connection @@ -2107,17 +2085,6 @@ en: terms: '[translate with synonyms or related terms for ''Leaf Cycle'', separated by commas]' leaf_cycle_singular: # leaf_cycle=* - label: Leaf Cycle - options: - # leaf_cycle=deciduous - deciduous: Deciduous - # leaf_cycle=evergreen - evergreen: Evergreen - # leaf_cycle=semi_deciduous - semi_deciduous: Semi-Deciduous - # leaf_cycle=semi_evergreen - semi_evergreen: Semi-Evergreen - terms: '[translate with synonyms or related terms for ''Leaf Cycle'', separated by commas]' leaf_type: # leaf_type=* label: Leaf Type @@ -2134,13 +2101,6 @@ en: leaf_type_singular: # leaf_type=* label: Leaf Type - options: - # leaf_type=broadleaved - broadleaved: Broadleaved - # leaf_type=leafless - leafless: Leafless - # leaf_type=needleleaved - needleleaved: Needleleaved terms: '[translate with synonyms or related terms for ''Leaf Type'', separated by commas]' leisure: # leisure=* @@ -2189,7 +2149,6 @@ en: terms: '[translate with synonyms or related terms for ''Location'', separated by commas]' location_pool: # location=* - label: Location options: # location=indoor indoor: Indoor @@ -2275,8 +2234,6 @@ en: terms: '[translate with synonyms or related terms for ''Max Weight'', separated by commas]' maxweight_bridge: # maxweight=* - label: Max Weight - terms: '[translate with synonyms or related terms for ''Max Weight'', separated by commas]' maxwidth: # maxwidth=* label: Max Width @@ -2475,7 +2432,6 @@ en: terms: '[translate with synonyms or related terms for ''One Way (Bicycles)'', separated by commas]' oneway_yes: # oneway=* - label: One Way options: # oneway=alternating alternating: Alternating @@ -2589,11 +2545,6 @@ en: parking_entrance: # parking=* label: Type - options: - # parking=multi-storey - multi-storey: Multilevel - # parking=underground - underground: Underground parking_space: # parking_space=* label: Type @@ -2721,7 +2672,6 @@ en: placeholder: Easy, Intermediate, Advanced... piste/difficulty_downhill: # piste:difficulty=* - label: Difficulty options: # piste:difficulty=advanced advanced: Advanced (black diamond) @@ -2741,7 +2691,6 @@ en: placeholder: Easy, Intermediate, Advanced... piste/difficulty_nordic: # piste:difficulty=* - label: Difficulty options: # piste:difficulty=advanced advanced: Advanced - Narrow, steep or icy section, sharp turn @@ -2757,7 +2706,6 @@ en: placeholder: Easy, Intermediate, Advanced... piste/difficulty_skitour: # piste:difficulty=* - label: Difficulty options: # piste:difficulty=advanced advanced: 'Advanced - S: 40-45° incline' @@ -2793,7 +2741,6 @@ en: skating: Skating piste/grooming_downhill: # piste:grooming=* - label: Grooming options: # piste:grooming=backcountry backcountry: Backcountry - no grooming @@ -2803,7 +2750,6 @@ en: mogul: Mogul piste/grooming_hike: # piste:grooming=* - label: Grooming options: # piste:grooming=backcountry backcountry: Backcountry - Snowshoeing @@ -2811,7 +2757,6 @@ en: classic: Classic - Winter Hiking piste/grooming_nordic: # piste:grooming=* - label: Grooming options: # piste:grooming=backcountry backcountry: Backcountry, no grooming @@ -4257,8 +4202,6 @@ en: terms: '[translate with synonyms or related terms for ''Tertiary Voltage'', separated by commas]' voltage_electrified: # voltage=* - label: Voltage - terms: '[translate with synonyms or related terms for ''Voltage'', separated by commas]' wall: # wall=* label: Type