Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ntp: customizer translations #1439

Merged
merged 5 commits into from
Jan 31, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions special-pages/pages/new-tab/app/customizer/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
},
"customizer_section_title_background": {
"title": "Background",
"note": ""
"note": "Section title displayed in the UI for customizing the background."
},
"customizer_section_title_theme": {
"title": "Browser Theme",
"note": ""
"note": "Section title for a section where users can customize the browser theme. (for example, 'light' or 'dark')"
},
"customizer_section_title_sections": {
"title": "Sections",
"note": ""
"note": "Section title for a list of toggles for showing/hiding certain sections of the page."
},
"customizer_browser_theme_light": {
"title": "Light",
Expand All @@ -33,7 +33,7 @@
},
"customizer_browser_theme_label": {
"title": "Select {type} theme",
"note": "The label text on a button, for assistive technologies. {type} will be replace with 'light', 'dark' or 'system'"
"note": "The label text on a button, for assistive technologies (like screen readers). {type} will be replace with 'light', 'dark' or 'system'"
},
"customizer_settings_link": {
"title": "Go to Settings",
Expand Down Expand Up @@ -61,7 +61,7 @@
},
"customizer_image_select": {
"title": "Select image {number}",
"note": "Label text on a button, for assistive technologies. {number} will be replaced with a numeric reference of 1-8, eg: 'Select image 1'"
"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'"
},
"customizer_image_delete": {
"title": "Delete image {number}",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ export const FavoritesThemeContext = createContext({
*/
export function Favorites({ gridRef, favorites, expansion, toggle, openContextMenu, openFavorite, add, canAnimateItems }) {
const { t } = useTypedTranslationWith(/** @type {import('../strings.json')} */ ({}));
const platformName = usePlatformName();

// see: https://www.w3.org/WAI/ARIA/apg/patterns/accordion/examples/accordion/
const WIDGET_ID = useId();
const TOGGLE_ID = useId();
Expand All @@ -60,12 +58,10 @@ export function Favorites({ gridRef, favorites, expansion, toggle, openContextMe
const kind = useComputed(() => data.value.background.kind);

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

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { PragmaticDND } from './PragmaticDND.js';
import { FavoritesMemo } from './Favorites.js';
import { viewTransition } from '../../utils.js';
import { CustomizerContext } from '../../customizer/CustomizerProvider.js';
import { usePlatformName } from '../../settings.provider.js';

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

/**
Expand All @@ -29,12 +27,7 @@ export function FavoritesConsumer() {
*/
function didReorder(data) {
const background = backgroundData.value.background;
let supportsViewTransitions = false;

if (state.config?.animation?.kind === 'view-transitions') {
if (platformName === 'windows') supportsViewTransitions = true;
if (platformName === 'macos' && background.kind !== 'userImage') supportsViewTransitions = true;
}
const supportsViewTransitions = state.config?.animation?.kind === 'view-transitions' && background.kind !== 'userImage';

if (supportsViewTransitions) {
viewTransition(() => {
Expand Down
76 changes: 74 additions & 2 deletions special-pages/pages/new-tab/public/locales/de/new-tab.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,16 @@
"title" : "Blockierte Tracking-Versuche",
"note" : "Used as a label in a customization menu"
},
"stats_menuTitle_v2" : {
"title" : "Schutzstatistiken",
"note" : "Used as a label in a customization menu"
},
"stats_noActivity" : {
"title" : "Blockierte Tracking-Versuche werden hier angezeigt. Browse weiter, um zu sehen, wie viele wir blockieren.",
"title" : "DuckDuckGo blockiert Tracking-Versuche, während du browst. Besuche ein paar Seiten, um zu sehen, wie viele wir blockieren!",
"note" : "Placeholder for when we cannot report any blocked trackers yet"
},
"stats_noRecent" : {
"title" : "Keine aktuellen Tracking-Aktivitäten",
"title" : "Tracking-Schutz aktiv",
"note" : "Placeholder to indicate that no tracking activity was blocked in the last 7 days"
},
"stats_countBlockedSingular" : {
Expand Down Expand Up @@ -199,5 +203,73 @@
"favorites_add" : {
"title" : "Favorit hinzufügen",
"note" : "A button that allows a user to add a new 'favorite' bookmark to their existing list"
},
"customizer_image_privacy" : {
"title" : "Die Bilder werden auf deinem Gerät gespeichert, sodass DuckDuckGo sie nicht sehen oder darauf zugreifen kann.",
"note" : "Shown near a button that allows a user to upload an image to be used as a background."
},
"customizer_drawer_title" : {
"title" : "Anpassen",
"note" : "Title in a slide-out drawer that contains options for customizing the browser."
},
"customizer_section_title_background" : {
"title" : "Hintergrund",
"note" : "Section title displayed in the UI for customizing the background."
},
"customizer_section_title_theme" : {
"title" : "Browser-Thema",
"note" : "Section title for a section where users can customize the browser theme. (for example, 'light' or 'dark')"
},
"customizer_section_title_sections" : {
"title" : "Abschnitte",
"note" : "Section title for a list of toggles for showing/hiding certain sections of the page."
},
"customizer_browser_theme_light" : {
"title" : "Hell",
"note" : "The label for a button that sets the browser theme to 'light' mode"
},
"customizer_browser_theme_dark" : {
"title" : "Dunkel",
"note" : "The label for a button that sets the browser theme to 'dark' mode"
},
"customizer_browser_theme_system" : {
"title" : "Standard",
"note" : "The label for a button that sets the browser theme to 'system', which matches the operating system setting"
},
"customizer_browser_theme_label" : {
"title" : "Design {type} auswählen",
"note" : "The label text on a button, for assistive technologies (like screen readers). {type} will be replace with 'light', 'dark' or 'system'"
},
"customizer_settings_link" : {
"title" : "Gehe zu Einstellungen",
"note" : "The label text on a link that opens the Settings"
},
"customizer_background_selection_default" : {
"title" : "Standard",
"note" : "Label text below a button that selects a 'default' background"
},
"customizer_background_selection_color" : {
"title" : "Solide Farben",
"note" : "Label text below a button that allows a color background"
},
"customizer_background_selection_gradient" : {
"title" : "Farbverläufe",
"note" : "Label text below a button that allows a gradient background"
},
"customizer_background_selection_image_add" : {
"title" : "Hintergrund hinzufügen",
"note" : "Label text shown on a button that allows an image to be uploaded"
},
"customizer_background_selection_image_existing" : {
"title" : "Meine Hintergründe",
"note" : "Label text shown on a button navigates to list of existing background (that the user previously uploaded)"
},
"customizer_image_select" : {
"title" : "Bild {number} auswählen",
"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'"
},
"customizer_image_delete" : {
"title" : "Bild {number} löschen",
"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'"
}
}
10 changes: 5 additions & 5 deletions special-pages/pages/new-tab/public/locales/en/new-tab.json
Original file line number Diff line number Diff line change
Expand Up @@ -215,15 +215,15 @@
},
"customizer_section_title_background": {
"title": "Background",
"note": ""
"note": "Section title displayed in the UI for customizing the background."
},
"customizer_section_title_theme": {
"title": "Browser Theme",
"note": ""
"note": "Section title for a section where users can customize the browser theme. (for example, 'light' or 'dark')"
},
"customizer_section_title_sections": {
"title": "Sections",
"note": ""
"note": "Section title for a list of toggles for showing/hiding certain sections of the page."
},
"customizer_browser_theme_light": {
"title": "Light",
Expand All @@ -239,7 +239,7 @@
},
"customizer_browser_theme_label": {
"title": "Select {type} theme",
"note": "The label text on a button, for assistive technologies. {type} will be replace with 'light', 'dark' or 'system'"
"note": "The label text on a button, for assistive technologies (like screen readers). {type} will be replace with 'light', 'dark' or 'system'"
},
"customizer_settings_link": {
"title": "Go to Settings",
Expand Down Expand Up @@ -267,7 +267,7 @@
},
"customizer_image_select": {
"title": "Select image {number}",
"note": "Label text on a button, for assistive technologies. {number} will be replaced with a numeric reference of 1-8, eg: 'Select image 1'"
"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'"
},
"customizer_image_delete": {
"title": "Delete image {number}",
Expand Down
76 changes: 74 additions & 2 deletions special-pages/pages/new-tab/public/locales/es/new-tab.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,16 @@
"title" : "Intentos de rastreo bloqueados",
"note" : "Used as a label in a customization menu"
},
"stats_menuTitle_v2" : {
"title" : "Estadísticas de protección",
"note" : "Used as a label in a customization menu"
},
"stats_noActivity" : {
"title" : "Los intentos de rastreo bloqueados aparecerán aquí. Sigue navegando para ver cuántos bloqueamos.",
"title" : "DuckDuckGo bloquea los intentos de rastreo mientras navegas. ¡Visita algunos sitios para ver cuántos bloqueamos!",
"note" : "Placeholder for when we cannot report any blocked trackers yet"
},
"stats_noRecent" : {
"title" : "No hay actividad de rastreo reciente",
"title" : "Protecciones de rastreo activas",
"note" : "Placeholder to indicate that no tracking activity was blocked in the last 7 days"
},
"stats_countBlockedSingular" : {
Expand Down Expand Up @@ -199,5 +203,73 @@
"favorites_add" : {
"title" : "Añadir favorito",
"note" : "A button that allows a user to add a new 'favorite' bookmark to their existing list"
},
"customizer_image_privacy" : {
"title" : "Las imágenes se almacenan en tu dispositivo, por lo que DuckDuckGo no puede verlas ni acceder a ellas.",
"note" : "Shown near a button that allows a user to upload an image to be used as a background."
},
"customizer_drawer_title" : {
"title" : "Personalizar",
"note" : "Title in a slide-out drawer that contains options for customizing the browser."
},
"customizer_section_title_background" : {
"title" : "Fondo",
"note" : "Section title displayed in the UI for customizing the background."
},
"customizer_section_title_theme" : {
"title" : "Tema del navegador",
"note" : "Section title for a section where users can customize the browser theme. (for example, 'light' or 'dark')"
},
"customizer_section_title_sections" : {
"title" : "Secciones",
"note" : "Section title for a list of toggles for showing/hiding certain sections of the page."
},
"customizer_browser_theme_light" : {
"title" : "Claro",
"note" : "The label for a button that sets the browser theme to 'light' mode"
},
"customizer_browser_theme_dark" : {
"title" : "Oscuro",
"note" : "The label for a button that sets the browser theme to 'dark' mode"
},
"customizer_browser_theme_system" : {
"title" : "Sistema",
"note" : "The label for a button that sets the browser theme to 'system', which matches the operating system setting"
},
"customizer_browser_theme_label" : {
"title" : "Seleccionar tema {type}",
"note" : "The label text on a button, for assistive technologies (like screen readers). {type} will be replace with 'light', 'dark' or 'system'"
},
"customizer_settings_link" : {
"title" : "Ir a Ajustes",
"note" : "The label text on a link that opens the Settings"
},
"customizer_background_selection_default" : {
"title" : "Predeterminado",
"note" : "Label text below a button that selects a 'default' background"
},
"customizer_background_selection_color" : {
"title" : "Colores sólidos",
"note" : "Label text below a button that allows a color background"
},
"customizer_background_selection_gradient" : {
"title" : "Gradientes",
"note" : "Label text below a button that allows a gradient background"
},
"customizer_background_selection_image_add" : {
"title" : "Añadir fondo",
"note" : "Label text shown on a button that allows an image to be uploaded"
},
"customizer_background_selection_image_existing" : {
"title" : "Mis fondos",
"note" : "Label text shown on a button navigates to list of existing background (that the user previously uploaded)"
},
"customizer_image_select" : {
"title" : "Seleccionar imagen {number}",
"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'"
},
"customizer_image_delete" : {
"title" : "Eliminar imagen {number}",
"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'"
}
}
Loading
Loading