Skip to content

Commit

Permalink
Rename "Map Features" to "Filters" adjust translation string keys
Browse files Browse the repository at this point in the history
This is also an experiment to see whether these strings get replaced
from Translation Memory even after being assigned new string keys.
My hope is that they don't need to be re-translated.
  • Loading branch information
bhousel committed Nov 18, 2024
1 parent cd0b8c5 commit 474211d
Show file tree
Hide file tree
Showing 6 changed files with 107 additions and 67 deletions.
16 changes: 6 additions & 10 deletions data/core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,12 @@ en:
add_area:
title: Area
description: "Add buildings, parks, lakes, or other areas to the map."
filter_tooltip: areas
add_line:
title: Line
description: "Add roads, walking paths, streams, or other lines to the map."
filter_tooltip: lines
add_point:
title: Point
description: "Add businesses, waste baskets, post boxes, or other points to the map."
filter_tooltip: points
add_note:
title: Note
description: "Spotted an issue? Let other mappers know."
Expand Down Expand Up @@ -863,7 +860,6 @@ en:
style_options: Style Options
highlight_edits:
key: G
map_features: Map Features
autohidden: "These features have been automatically hidden because too many would be shown on the screen. You can zoom in to edit them."
osmhidden: "These features have been automatically hidden because the OpenStreetMap layer is hidden."
visual_diff:
Expand All @@ -889,7 +885,11 @@ en:
username_filter:
title: "Username"
tooltip: "Show only photos by this user"
feature:
filters:
title: Filters
active: "Some features are filtered:"
hidden_preset:
manual: "{features} are filtered. Enable them in the Map Data pane."
points:
description: Points
tooltip: "Points of Interest"
Expand Down Expand Up @@ -949,10 +949,6 @@ en:
full:
description: Full Fill
tooltip: "Areas are drawn fully filled."
filters:
hidden_preset:
manual: "{features} are filtered. Enable them in the Map Data pane."
active: "Some features are filtered:"
settings:
custom_background:
tooltip: Edit custom background
Expand Down Expand Up @@ -1106,9 +1102,9 @@ en:
text_v24: "This release improves Rapid's text localization, and makes it easier to work with street-level data like Mapillary. Now you can inspect detected objects, such as traffic signs, crosswalks, bike racks, and more!\n\nFor all the details check out our [changelog](https://github.com/facebook/Rapid/blob/main/CHANGELOG.md#whats-new) and [issue tracker](https://github.com/facebook/Rapid/issues) on GitHub. Happy Mapping! 👍"
dontshowagain: "Hide this screen until the next version"
source_switch:
dev: dev
live: live
lose_changes: "You have unsaved changes. Switching the map server will discard them. Are you sure you want to switch servers?"
dev: dev
rapid_splash:
welcome: Introducing AI-assisted mapping!
text: "Select the {rapidicon} option to start the Rapid walkthrough. If you're new to OSM and haven't mapped before, select the first {walkthrough} option. Finally, click the last {edit} option if you want to get straight to mapping. You can always access the walkthrough later from the help menu."
Expand Down
27 changes: 11 additions & 16 deletions data/l10n/core.en.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,15 @@
"modes": {
"add_area": {
"title": "Area",
"description": "Add buildings, parks, lakes, or other areas to the map.",
"filter_tooltip": "areas"
"description": "Add buildings, parks, lakes, or other areas to the map."
},
"add_line": {
"title": "Line",
"description": "Add roads, walking paths, streams, or other lines to the map.",
"filter_tooltip": "lines"
"description": "Add roads, walking paths, streams, or other lines to the map."
},
"add_point": {
"title": "Point",
"description": "Add businesses, waste baskets, post boxes, or other points to the map.",
"filter_tooltip": "points"
"description": "Add businesses, waste baskets, post boxes, or other points to the map."
},
"add_note": {
"title": "Note",
Expand Down Expand Up @@ -1094,7 +1091,6 @@
"highlight_edits": {
"key": "G"
},
"map_features": "Map Features",
"autohidden": "These features have been automatically hidden because too many would be shown on the screen. You can zoom in to edit them.",
"osmhidden": "These features have been automatically hidden because the OpenStreetMap layer is hidden."
},
Expand Down Expand Up @@ -1131,7 +1127,12 @@
"tooltip": "Show only photos by this user"
}
},
"feature": {
"filters": {
"title": "Filters",
"active": "Some features are filtered:",
"hidden_preset": {
"manual": "{features} are filtered. Enable them in the Map Data pane."
},
"points": {
"description": "Points",
"tooltip": "Points of Interest"
Expand Down Expand Up @@ -1212,12 +1213,6 @@
"tooltip": "Areas are drawn fully filled."
}
},
"filters": {
"hidden_preset": {
"manual": "{features} are filtered. Enable them in the Map Data pane."
},
"active": "Some features are filtered:"
},
"settings": {
"custom_background": {
"tooltip": "Edit custom background",
Expand Down Expand Up @@ -1403,9 +1398,9 @@
"dontshowagain": "Hide this screen until the next version"
},
"source_switch": {
"dev": "dev",
"live": "live",
"lose_changes": "You have unsaved changes. Switching the map server will discard them. Are you sure you want to switch servers?",
"dev": "dev"
"lose_changes": "You have unsaved changes. Switching the map server will discard them. Are you sure you want to switch servers?"
},
"rapid_splash": {
"welcome": "Introducing AI-assisted mapping!",
Expand Down
2 changes: 1 addition & 1 deletion modules/ui/UiFilterStatus.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export class UiFilterStatus {
if (filter.count > 0) {
total += filter.count;
details.push(
l10n.t('inspector.title_count', { title: l10n.t(`feature.${filterID}.description`), count: filter.count })
l10n.t('inspector.title_count', { title: l10n.t(`filters.${filterID}.description`), count: filter.count })
);
}
}
Expand Down
8 changes: 4 additions & 4 deletions modules/ui/sections/map_features.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ export function uiSectionMapFeatures(context) {
const filters = context.systems.filters;
const l10n = context.systems.l10n;

const section = uiSection(context, 'map-features')
.label(l10n.t('map_data.map_features'))
const section = uiSection(context, 'filters')
.label(l10n.t('filters.title'))
.disclosureContent(renderDisclosureContent);


Expand Down Expand Up @@ -68,7 +68,7 @@ export function uiSectionMapFeatures(context) {
let enter = items.enter()
.append('li')
.call(uiTooltip(context)
.title(d => l10n.t(`feature.${d}.tooltip`))
.title(d => l10n.t(`filters.${d}.tooltip`))
.placement('top')
);

Expand All @@ -83,7 +83,7 @@ export function uiSectionMapFeatures(context) {

label
.append('span')
.text(d => l10n.t(`feature.${d}.description`));
.text(d => l10n.t(`filters.${d}.description`));

// Update
items = items
Expand Down
Loading

0 comments on commit 474211d

Please sign in to comment.