Skip to content

Commit c6b67bb

Browse files
authored
ntp: customizer translations (#1439)
* ntp: customizer translations * never apply view-transitions if the background is a user-image * linting * translations * remove file
1 parent a0325f6 commit c6b67bb

File tree

11 files changed

+531
-38
lines changed

11 files changed

+531
-38
lines changed

special-pages/pages/new-tab/app/customizer/strings.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@
99
},
1010
"customizer_section_title_background": {
1111
"title": "Background",
12-
"note": ""
12+
"note": "Section title displayed in the UI for customizing the background."
1313
},
1414
"customizer_section_title_theme": {
1515
"title": "Browser Theme",
16-
"note": ""
16+
"note": "Section title for a section where users can customize the browser theme. (for example, 'light' or 'dark')"
1717
},
1818
"customizer_section_title_sections": {
1919
"title": "Sections",
20-
"note": ""
20+
"note": "Section title for a list of toggles for showing/hiding certain sections of the page."
2121
},
2222
"customizer_browser_theme_light": {
2323
"title": "Light",
@@ -33,7 +33,7 @@
3333
},
3434
"customizer_browser_theme_label": {
3535
"title": "Select {type} theme",
36-
"note": "The label text on a button, for assistive technologies. {type} will be replace with 'light', 'dark' or 'system'"
36+
"note": "The label text on a button, for assistive technologies (like screen readers). {type} will be replace with 'light', 'dark' or 'system'"
3737
},
3838
"customizer_settings_link": {
3939
"title": "Go to Settings",
@@ -61,7 +61,7 @@
6161
},
6262
"customizer_image_select": {
6363
"title": "Select image {number}",
64-
"note": "Label text on a button, for assistive technologies. {number} will be replaced with a numeric reference of 1-8, eg: 'Select image 1'"
64+
"note": "Label text on a button, for assistive technologies (like screen readers). {number} will be replaced with a numeric reference of 1-8, eg: 'Select image 1'"
6565
},
6666
"customizer_image_delete": {
6767
"title": "Delete image {number}",

special-pages/pages/new-tab/app/favorites/components/Favorites.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@ export const FavoritesThemeContext = createContext({
4646
*/
4747
export function Favorites({ gridRef, favorites, expansion, toggle, openContextMenu, openFavorite, add, canAnimateItems }) {
4848
const { t } = useTypedTranslationWith(/** @type {import('../strings.json')} */ ({}));
49-
const platformName = usePlatformName();
50-
5149
// see: https://www.w3.org/WAI/ARIA/apg/patterns/accordion/examples/accordion/
5250
const WIDGET_ID = useId();
5351
const TOGGLE_ID = useId();
@@ -60,12 +58,10 @@ export function Favorites({ gridRef, favorites, expansion, toggle, openContextMe
6058
const kind = useComputed(() => data.value.background.kind);
6159

6260
// A flag to determine if animations are available. This is needed
63-
// because in webkit applying 'view-transition' css properties causes an odd experience
61+
// because 'view-transition' CSS properties causes an odd experience
6462
// with filters.
6563
const animateItems = useComputed(() => {
66-
if (platformName === 'windows' && canAnimateItems) return true;
67-
if (platformName === 'macos' && canAnimateItems && kind.value !== 'userImage') return true;
68-
return false;
64+
return canAnimateItems && kind.value !== 'userImage';
6965
});
7066

7167
return (

special-pages/pages/new-tab/app/favorites/components/FavoritesCustomized.js

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import { PragmaticDND } from './PragmaticDND.js';
1010
import { FavoritesMemo } from './Favorites.js';
1111
import { viewTransition } from '../../utils.js';
1212
import { CustomizerContext } from '../../customizer/CustomizerProvider.js';
13-
import { usePlatformName } from '../../settings.provider.js';
1413

1514
/**
1615
* @typedef {import('../../../types/new-tab.ts').Favorite} Favorite
@@ -19,7 +18,6 @@ import { usePlatformName } from '../../settings.provider.js';
1918
export function FavoritesConsumer() {
2019
const { state, toggle, favoritesDidReOrder, openContextMenu, openFavorite, add } = useContext(FavoritesContext);
2120
const telemetry = useTelemetry();
22-
const platformName = usePlatformName();
2321
const { data: backgroundData } = useContext(CustomizerContext);
2422

2523
/**
@@ -29,12 +27,7 @@ export function FavoritesConsumer() {
2927
*/
3028
function didReorder(data) {
3129
const background = backgroundData.value.background;
32-
let supportsViewTransitions = false;
33-
34-
if (state.config?.animation?.kind === 'view-transitions') {
35-
if (platformName === 'windows') supportsViewTransitions = true;
36-
if (platformName === 'macos' && background.kind !== 'userImage') supportsViewTransitions = true;
37-
}
30+
const supportsViewTransitions = state.config?.animation?.kind === 'view-transitions' && background.kind !== 'userImage';
3831

3932
if (supportsViewTransitions) {
4033
viewTransition(() => {

special-pages/pages/new-tab/public/locales/de/new-tab.json

Lines changed: 74 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,16 @@
4444
"title" : "Blockierte Tracking-Versuche",
4545
"note" : "Used as a label in a customization menu"
4646
},
47+
"stats_menuTitle_v2" : {
48+
"title" : "Schutzstatistiken",
49+
"note" : "Used as a label in a customization menu"
50+
},
4751
"stats_noActivity" : {
48-
"title" : "Blockierte Tracking-Versuche werden hier angezeigt. Browse weiter, um zu sehen, wie viele wir blockieren.",
52+
"title" : "DuckDuckGo blockiert Tracking-Versuche, während du browst. Besuche ein paar Seiten, um zu sehen, wie viele wir blockieren!",
4953
"note" : "Placeholder for when we cannot report any blocked trackers yet"
5054
},
5155
"stats_noRecent" : {
52-
"title" : "Keine aktuellen Tracking-Aktivitäten",
56+
"title" : "Tracking-Schutz aktiv",
5357
"note" : "Placeholder to indicate that no tracking activity was blocked in the last 7 days"
5458
},
5559
"stats_countBlockedSingular" : {
@@ -199,5 +203,73 @@
199203
"favorites_add" : {
200204
"title" : "Favorit hinzufügen",
201205
"note" : "A button that allows a user to add a new 'favorite' bookmark to their existing list"
206+
},
207+
"customizer_image_privacy" : {
208+
"title" : "Die Bilder werden auf deinem Gerät gespeichert, sodass DuckDuckGo sie nicht sehen oder darauf zugreifen kann.",
209+
"note" : "Shown near a button that allows a user to upload an image to be used as a background."
210+
},
211+
"customizer_drawer_title" : {
212+
"title" : "Anpassen",
213+
"note" : "Title in a slide-out drawer that contains options for customizing the browser."
214+
},
215+
"customizer_section_title_background" : {
216+
"title" : "Hintergrund",
217+
"note" : "Section title displayed in the UI for customizing the background."
218+
},
219+
"customizer_section_title_theme" : {
220+
"title" : "Browser-Thema",
221+
"note" : "Section title for a section where users can customize the browser theme. (for example, 'light' or 'dark')"
222+
},
223+
"customizer_section_title_sections" : {
224+
"title" : "Abschnitte",
225+
"note" : "Section title for a list of toggles for showing/hiding certain sections of the page."
226+
},
227+
"customizer_browser_theme_light" : {
228+
"title" : "Hell",
229+
"note" : "The label for a button that sets the browser theme to 'light' mode"
230+
},
231+
"customizer_browser_theme_dark" : {
232+
"title" : "Dunkel",
233+
"note" : "The label for a button that sets the browser theme to 'dark' mode"
234+
},
235+
"customizer_browser_theme_system" : {
236+
"title" : "Standard",
237+
"note" : "The label for a button that sets the browser theme to 'system', which matches the operating system setting"
238+
},
239+
"customizer_browser_theme_label" : {
240+
"title" : "Design {type} auswählen",
241+
"note" : "The label text on a button, for assistive technologies (like screen readers). {type} will be replace with 'light', 'dark' or 'system'"
242+
},
243+
"customizer_settings_link" : {
244+
"title" : "Gehe zu Einstellungen",
245+
"note" : "The label text on a link that opens the Settings"
246+
},
247+
"customizer_background_selection_default" : {
248+
"title" : "Standard",
249+
"note" : "Label text below a button that selects a 'default' background"
250+
},
251+
"customizer_background_selection_color" : {
252+
"title" : "Solide Farben",
253+
"note" : "Label text below a button that allows a color background"
254+
},
255+
"customizer_background_selection_gradient" : {
256+
"title" : "Farbverläufe",
257+
"note" : "Label text below a button that allows a gradient background"
258+
},
259+
"customizer_background_selection_image_add" : {
260+
"title" : "Hintergrund hinzufügen",
261+
"note" : "Label text shown on a button that allows an image to be uploaded"
262+
},
263+
"customizer_background_selection_image_existing" : {
264+
"title" : "Meine Hintergründe",
265+
"note" : "Label text shown on a button navigates to list of existing background (that the user previously uploaded)"
266+
},
267+
"customizer_image_select" : {
268+
"title" : "Bild {number} auswählen",
269+
"note" : "Label text on a button, for assistive technologies (like screen readers). {number} will be replaced with a numeric reference of 1-8, eg: 'Select image 1'"
270+
},
271+
"customizer_image_delete" : {
272+
"title" : "Bild {number} löschen",
273+
"note" : "Label text on a button that deletes an image. {number} will be replaced with a numeric reference of 1-8, eg: 'Delete image 1'"
202274
}
203275
}

special-pages/pages/new-tab/public/locales/en/new-tab.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -215,15 +215,15 @@
215215
},
216216
"customizer_section_title_background": {
217217
"title": "Background",
218-
"note": ""
218+
"note": "Section title displayed in the UI for customizing the background."
219219
},
220220
"customizer_section_title_theme": {
221221
"title": "Browser Theme",
222-
"note": ""
222+
"note": "Section title for a section where users can customize the browser theme. (for example, 'light' or 'dark')"
223223
},
224224
"customizer_section_title_sections": {
225225
"title": "Sections",
226-
"note": ""
226+
"note": "Section title for a list of toggles for showing/hiding certain sections of the page."
227227
},
228228
"customizer_browser_theme_light": {
229229
"title": "Light",
@@ -239,7 +239,7 @@
239239
},
240240
"customizer_browser_theme_label": {
241241
"title": "Select {type} theme",
242-
"note": "The label text on a button, for assistive technologies. {type} will be replace with 'light', 'dark' or 'system'"
242+
"note": "The label text on a button, for assistive technologies (like screen readers). {type} will be replace with 'light', 'dark' or 'system'"
243243
},
244244
"customizer_settings_link": {
245245
"title": "Go to Settings",
@@ -267,7 +267,7 @@
267267
},
268268
"customizer_image_select": {
269269
"title": "Select image {number}",
270-
"note": "Label text on a button, for assistive technologies. {number} will be replaced with a numeric reference of 1-8, eg: 'Select image 1'"
270+
"note": "Label text on a button, for assistive technologies (like screen readers). {number} will be replaced with a numeric reference of 1-8, eg: 'Select image 1'"
271271
},
272272
"customizer_image_delete": {
273273
"title": "Delete image {number}",

special-pages/pages/new-tab/public/locales/es/new-tab.json

Lines changed: 74 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,16 @@
4444
"title" : "Intentos de rastreo bloqueados",
4545
"note" : "Used as a label in a customization menu"
4646
},
47+
"stats_menuTitle_v2" : {
48+
"title" : "Estadísticas de protección",
49+
"note" : "Used as a label in a customization menu"
50+
},
4751
"stats_noActivity" : {
48-
"title" : "Los intentos de rastreo bloqueados aparecerán aquí. Sigue navegando para ver cuántos bloqueamos.",
52+
"title" : "DuckDuckGo bloquea los intentos de rastreo mientras navegas. ¡Visita algunos sitios para ver cuántos bloqueamos!",
4953
"note" : "Placeholder for when we cannot report any blocked trackers yet"
5054
},
5155
"stats_noRecent" : {
52-
"title" : "No hay actividad de rastreo reciente",
56+
"title" : "Protecciones de rastreo activas",
5357
"note" : "Placeholder to indicate that no tracking activity was blocked in the last 7 days"
5458
},
5559
"stats_countBlockedSingular" : {
@@ -199,5 +203,73 @@
199203
"favorites_add" : {
200204
"title" : "Añadir favorito",
201205
"note" : "A button that allows a user to add a new 'favorite' bookmark to their existing list"
206+
},
207+
"customizer_image_privacy" : {
208+
"title" : "Las imágenes se almacenan en tu dispositivo, por lo que DuckDuckGo no puede verlas ni acceder a ellas.",
209+
"note" : "Shown near a button that allows a user to upload an image to be used as a background."
210+
},
211+
"customizer_drawer_title" : {
212+
"title" : "Personalizar",
213+
"note" : "Title in a slide-out drawer that contains options for customizing the browser."
214+
},
215+
"customizer_section_title_background" : {
216+
"title" : "Fondo",
217+
"note" : "Section title displayed in the UI for customizing the background."
218+
},
219+
"customizer_section_title_theme" : {
220+
"title" : "Tema del navegador",
221+
"note" : "Section title for a section where users can customize the browser theme. (for example, 'light' or 'dark')"
222+
},
223+
"customizer_section_title_sections" : {
224+
"title" : "Secciones",
225+
"note" : "Section title for a list of toggles for showing/hiding certain sections of the page."
226+
},
227+
"customizer_browser_theme_light" : {
228+
"title" : "Claro",
229+
"note" : "The label for a button that sets the browser theme to 'light' mode"
230+
},
231+
"customizer_browser_theme_dark" : {
232+
"title" : "Oscuro",
233+
"note" : "The label for a button that sets the browser theme to 'dark' mode"
234+
},
235+
"customizer_browser_theme_system" : {
236+
"title" : "Sistema",
237+
"note" : "The label for a button that sets the browser theme to 'system', which matches the operating system setting"
238+
},
239+
"customizer_browser_theme_label" : {
240+
"title" : "Seleccionar tema {type}",
241+
"note" : "The label text on a button, for assistive technologies (like screen readers). {type} will be replace with 'light', 'dark' or 'system'"
242+
},
243+
"customizer_settings_link" : {
244+
"title" : "Ir a Ajustes",
245+
"note" : "The label text on a link that opens the Settings"
246+
},
247+
"customizer_background_selection_default" : {
248+
"title" : "Predeterminado",
249+
"note" : "Label text below a button that selects a 'default' background"
250+
},
251+
"customizer_background_selection_color" : {
252+
"title" : "Colores sólidos",
253+
"note" : "Label text below a button that allows a color background"
254+
},
255+
"customizer_background_selection_gradient" : {
256+
"title" : "Gradientes",
257+
"note" : "Label text below a button that allows a gradient background"
258+
},
259+
"customizer_background_selection_image_add" : {
260+
"title" : "Añadir fondo",
261+
"note" : "Label text shown on a button that allows an image to be uploaded"
262+
},
263+
"customizer_background_selection_image_existing" : {
264+
"title" : "Mis fondos",
265+
"note" : "Label text shown on a button navigates to list of existing background (that the user previously uploaded)"
266+
},
267+
"customizer_image_select" : {
268+
"title" : "Seleccionar imagen {number}",
269+
"note" : "Label text on a button, for assistive technologies (like screen readers). {number} will be replaced with a numeric reference of 1-8, eg: 'Select image 1'"
270+
},
271+
"customizer_image_delete" : {
272+
"title" : "Eliminar imagen {number}",
273+
"note" : "Label text on a button that deletes an image. {number} will be replaced with a numeric reference of 1-8, eg: 'Delete image 1'"
202274
}
203275
}

0 commit comments

Comments
 (0)