Skip to content
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
4 changes: 4 additions & 0 deletions changelog/7520-add-es-us-language.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
type: Added
description: Added es-US language code with default translations from es-MX
pr: 7520
labels: []
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export enum SupportedLanguage {
EN_GB = "en-GB",
ES = "es",
ES_MX = "es-MX",
ES_US = "es-US",
ET = "et",
EU = "eu",
FI = "fi",
Expand Down
4 changes: 2 additions & 2 deletions clients/fides-js/__tests__/lib/i18n/i18n-utils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ describe("i18n-utils", () => {
const updatedLocales = loadMessagesFromFiles(mockI18n);

// Check the updated locales list is what we expect
const EXPECTED_NUM_STATIC_LOCALES = 41; // NOTE: manually update this as new locales added
const EXPECTED_NUM_STATIC_LOCALES = 42; // NOTE: manually update this as new locales added
expect(updatedLocales).toHaveLength(EXPECTED_NUM_STATIC_LOCALES);
expect(updatedLocales).toContain("en");
expect(mockI18n.load).toHaveBeenCalledTimes(EXPECTED_NUM_STATIC_LOCALES);
Expand Down Expand Up @@ -244,7 +244,7 @@ describe("i18n-utils", () => {
const updatedLocales = loadTcfMessagesFromFiles(mockI18n);

// Check the updated locales list is what we expect
const EXPECTED_NUM_STATIC_LOCALES = 41; // NOTE: manually update this as new locales added
const EXPECTED_NUM_STATIC_LOCALES = 42; // NOTE: manually update this as new locales added
expect(updatedLocales).toHaveLength(EXPECTED_NUM_STATIC_LOCALES);
expect(updatedLocales).toContain("en");
expect(mockI18n.load).toHaveBeenCalledTimes(EXPECTED_NUM_STATIC_LOCALES);
Expand Down
12 changes: 12 additions & 0 deletions clients/fides-js/src/lib/i18n/locales/es-US/messages.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"static.gpc": "Control de privacidad global",
"static.gpc.description": "Su preferencia de control de privacidad global se ha respetado. Se le excluyó automáticamente de los casos de uso de datos que se adhieren al control de privacidad global.",
"static.gpc.status.applied": "Aplicado",
"static.gpc.status.overridden": "Anulado",
"static.gpc.title": "Control de privacidad global detectado",
"static.other.cookies": "Cookies",
"static.other.back": "Atrás",
"static.other.vendors": "Proveedores",
"static.other.retention": "Retención",
"static.other.description": "Descripción"
}
7 changes: 7 additions & 0 deletions clients/fides-js/src/lib/i18n/locales/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import el from "./el/messages.json";
import en from "./en/messages.json";
import es from "./es/messages.json";
import esMX from "./es-MX/messages.json";
import esUS from "./es-US/messages.json";
import et from "./et/messages.json";
import eu from "./eu/messages.json";
import fi from "./fi/messages.json";
Expand Down Expand Up @@ -62,6 +63,7 @@ export const STATIC_MESSAGES: Record<Locale, Messages> = {
en: en,
es: es,
"es-MX": esMX,
"es-US": esUS,
et: et,
eu: eu,
fi: fi,
Expand Down Expand Up @@ -110,6 +112,11 @@ export const LOCALE_LANGUAGE_MAP: Language[] = [
label_en: "Spanish (Mexico)",
label_original: "Español - MX",
},
{
locale: "es-US",
label_en: "Spanish (United States)",
label_original: "Español - US",
},
{ locale: "et", label_en: "Estonian", label_original: "Eesti" },
{ locale: "eu", label_en: "Basque", label_original: "euskara" },
{ locale: "fi", label_en: "Finnish", label_original: "Suomi" },
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"static.tcf.consent": "Consentimiento",
"static.tcf.cookie_disclosure.also_non_cookie": "Este proveedor también una otros métodos como “almacenamiento local” para almacenar y acceder a información en su dispositivo.",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inherited typo in translation

The phrase "también una otros métodos" contains a typo — "una" should be "usa" (meaning "uses"). The same issue exists in the es-MX source file this was copied from. Since this PR explicitly creates es-US from es-MX, this is a good opportunity to fix it here (and optionally in es-MX too).

Suggested change
"static.tcf.cookie_disclosure.also_non_cookie": "Este proveedor también una otros métodos como “almacenamiento local para almacenar y acceder a información en su dispositivo.",
"static.tcf.cookie_disclosure.also_non_cookie": "Este proveedor también usa otros métodos como \u201calmacenamiento local\u201d para almacenar y acceder a información en su dispositivo.",

"static.tcf.cookie_disclosure.intro": "almacena cookies con una duración máxima de alrededor de estos días.",
"static.tcf.cookie_disclosure.non_cookie": "usa métodos como “almacenamiento local” para almacenar y acceder a información en su dispositivo.",
"static.tcf.cookie_disclosure.refresh": "Estas cookies se pueden actualizar.",
"static.tcf.data_categories": "Categorías de datos",
"static.tcf.features": "Características",
"static.tcf.features.description": "A continuación, encontrará una lista de las características para las que se están procesando sus datos. Puede ejercer sus derechos para las características especiales usando los botones a continuación.",
"static.tcf.legint": "Interés legítimo",
"static.tcf.legint_disclosure": "Divulgación de interés legítimo",
"static.tcf.privacy_policy": "Política de privacidad",
"static.tcf.purposes": "Propósitos",
"static.tcf.purposes.description": "A continuación, encontrará una lista de los propósitos y características especiales para los que se están procesando sus datos. Puede ejercer sus derechos para propósitos específicos, basándose en el consentimiento o interés legítimo, usando los botones a continuación.",
"static.tcf.retention": "Retención",
"static.tcf.retention_period_days": "día(s)",
"static.tcf.special_features": "Características especiales",
"static.tcf.special_purposes": "Propósitos especiales",
"static.tcf.vendors": "Proveedores",
"static.tcf.vendors.description": "A continuación, encontrará una lista de los proveedores que procesan sus datos y los propósitos o características de procesamiento que ellos declaran. Puede ejercer sus derechos para cada proveedor basándose en la base legal que afirman.",
"static.tcf.vendors.iab": "Proveedores IAB TCF",
"static.tcf.vendors.other": "Otros proveedores",
"static.tcf.vendors_count": "proveedor(es)",
"static.tcf.vendors_using_consent": "Proveedores que usan consentimiento",
"static.tcf.vendors_using_legint": "Proveedores que usan interés legítimo"
}
Comment on lines +1 to +26
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing translation key static.tcf.iab

The English reference locale (en/messages-tcf.json) includes the key "static.tcf.iab": "IAB TCF", which is absent from both es-MX and this new es-US file. This is a pre-existing gap inherited from es-MX. Since es-US is being created fresh here, it would be a good opportunity to add it:

"static.tcf.iab": "IAB TCF",

(The value is an acronym so no translation is needed.)

2 changes: 2 additions & 0 deletions clients/fides-js/src/lib/tcf/i18n/locales/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import el from "./el/messages-tcf.json";
import en from "./en/messages-tcf.json";
import es from "./es/messages-tcf.json";
import esMX from "./es-MX/messages-tcf.json";
import esUS from "./es-US/messages-tcf.json";
import et from "./et/messages-tcf.json";
import eu from "./eu/messages-tcf.json";
import fi from "./fi/messages-tcf.json";
Expand Down Expand Up @@ -61,6 +62,7 @@ export const STATIC_MESSAGES_TCF: Record<Locale, Messages> = {
en: en,
es: es,
"es-MX": esMX,
"es-US": esUS,
et: et,
eu: eu,
fi: fi,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export enum SupportedLanguage {
EN_GB = "en-GB",
ES = "es",
ES_MX = "es-MX",
ES_US = "es-US",
ET = "et",
EU = "eu",
FI = "fi",
Expand Down
2 changes: 2 additions & 0 deletions src/fides/data/language/languages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ languages:
name: Spanish
- id: es-MX
name: Spanish (Mexico)
- id: es-US
name: Spanish (United States)
- id: et
name: Estonian
- id: eu
Expand Down
Loading