-
Notifications
You must be signed in to change notification settings - Fork 21
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
added locale strings for DuckPlayer #1027
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,19 +41,20 @@ export async function init (messaging, baseEnvironment) { | |
|
||
document.body.dataset.display = environment.display | ||
|
||
const strings = environment.locale === 'en' | ||
? enStrings | ||
: await fetch(`./locales/${environment.locale}/duckplayer.json`) | ||
.then(resp => { | ||
if (!resp.ok) { | ||
throw new Error('did not give a result') | ||
} | ||
return resp.json() | ||
}) | ||
.catch(e => { | ||
console.error('Could not load locale', environment.locale, e) | ||
return enStrings | ||
}) | ||
// This will be re-enabled in the mobile PR | ||
// const strings = environment.locale === 'en' | ||
// ? enStrings | ||
// : await fetch(`./locales/${environment.locale}/duckplayer.json`) | ||
// .then(resp => { | ||
// if (!resp.ok) { | ||
// throw new Error('did not give a result') | ||
// } | ||
// return resp.json() | ||
// }) | ||
// .catch(e => { | ||
// console.error('Could not load locale', environment.locale, e) | ||
// return enStrings | ||
// }) | ||
Comment on lines
+44
to
+57
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This gets re-enabled later when we support mobile - but by removing it here, we can merge these strings in without risking untested UI hitting prod |
||
|
||
const settings = new Settings({}) | ||
.withPlatformName(baseEnvironment.injectName) | ||
|
@@ -86,7 +87,7 @@ export async function init (messaging, baseEnvironment) { | |
willThrow={environment.willThrow}> | ||
<ErrorBoundary didCatch={didCatch} fallback={<Fallback showDetails={environment.env === 'development'}/>}> | ||
<UpdateEnvironment search={window.location.search}/> | ||
<TranslationProvider translationObject={strings} fallback={enStrings} textLength={environment.textLength}> | ||
<TranslationProvider translationObject={enStrings} fallback={enStrings} textLength={environment.textLength}> | ||
<MessagingContext.Provider value={messaging}> | ||
<SettingsProvider settings={settings}> | ||
<UserValuesProvider initial={init.userValues}> | ||
|
@@ -105,7 +106,7 @@ export async function init (messaging, baseEnvironment) { | |
render( | ||
<EnvironmentProvider debugState={false} injectName={environment.injectName}> | ||
<MessagingContext.Provider value={messaging}> | ||
<TranslationProvider translationObject={strings} fallback={enStrings} textLength={environment.textLength}> | ||
<TranslationProvider translationObject={enStrings} fallback={enStrings} textLength={environment.textLength}> | ||
<Components /> | ||
</TranslationProvider> | ||
</MessagingContext.Provider> | ||
|
38 changes: 38 additions & 0 deletions
38
packages/special-pages/pages/duckplayer/src/locales/bg/duckplayer.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{ | ||
"smartling" : { | ||
"string_format" : "icu", | ||
"translate_paths" : [ | ||
{ | ||
"path" : "*/title", | ||
"key" : "{*}/title", | ||
"instruction" : "*/note" | ||
}] | ||
}, | ||
"alwaysWatchHere" : { | ||
"title" : "Видеоклиповете в YouTube винаги да се отварят тук", | ||
"note" : "label text for a checkbox that enables this feature for all videos, not just the current one" | ||
}, | ||
"keepEnabled" : { | ||
"title" : "Duck Player да остане включен", | ||
"note" : "label text for a checkbox that enables this feature for all videos, not just the current one" | ||
}, | ||
"openInfoButton" : { | ||
"title" : "Отваряне на информацията", | ||
"note" : "aria label text on a button, to indicate there's more information to be shown if clicked" | ||
}, | ||
"openSettingsButton" : { | ||
"title" : "Отваряне на настройки", | ||
"note" : "aria label text on a button, opens a screen where the user can change settings" | ||
}, | ||
"watchOnYoutube" : { | ||
"title" : "Гледане в YouTube", | ||
"note" : "text on a link that takes the user from the current page back onto YouTube.com" | ||
}, | ||
"invalidIdError" : { | ||
"title" : "<b>ГРЕШКА:</b> невалиден идентификатор на видеоклипа", | ||
"note" : "Shown when the page URL doesn't match a known video ID. Note for translators: The <b> tag makes the word 'ERROR:' bold. Depending on the grammar of the target language, you might need to move it so that the correct word is emphasized." | ||
}, | ||
"tooltipInfo" : { | ||
"title" : "Duck Player осигурява чисто изживяване без персонализирани реклами в YouTube и предотвратява влиянието на вече гледаните видеоклипове върху препоръките на YouTube." | ||
} | ||
} |
38 changes: 38 additions & 0 deletions
38
packages/special-pages/pages/duckplayer/src/locales/cs/duckplayer.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{ | ||
"smartling" : { | ||
"string_format" : "icu", | ||
"translate_paths" : [ | ||
{ | ||
"path" : "*/title", | ||
"key" : "{*}/title", | ||
"instruction" : "*/note" | ||
}] | ||
}, | ||
"alwaysWatchHere" : { | ||
"title" : "Vždy otevírat videa YouTube tady", | ||
"note" : "label text for a checkbox that enables this feature for all videos, not just the current one" | ||
}, | ||
"keepEnabled" : { | ||
"title" : "Nechat zapnutý přehrávač Duck Player", | ||
"note" : "label text for a checkbox that enables this feature for all videos, not just the current one" | ||
}, | ||
"openInfoButton" : { | ||
"title" : "Otevřít informace", | ||
"note" : "aria label text on a button, to indicate there's more information to be shown if clicked" | ||
}, | ||
"openSettingsButton" : { | ||
"title" : "Otevřené nastavení", | ||
"note" : "aria label text on a button, opens a screen where the user can change settings" | ||
}, | ||
"watchOnYoutube" : { | ||
"title" : "Sledovat na YouTube", | ||
"note" : "text on a link that takes the user from the current page back onto YouTube.com" | ||
}, | ||
"invalidIdError" : { | ||
"title" : "<b>CHYBA:</b> Neplatné ID videa", | ||
"note" : "Shown when the page URL doesn't match a known video ID. Note for translators: The <b> tag makes the word 'ERROR:' bold. Depending on the grammar of the target language, you might need to move it so that the correct word is emphasized." | ||
}, | ||
"tooltipInfo" : { | ||
"title" : "Přehrávač Duck Player nabízí sledování v minimalistickém prostředí bez personalizovaných reklam a brání tomu, aby sledovaná videa ovlivňovala tvoje doporučení na YouTube." | ||
} | ||
} |
38 changes: 38 additions & 0 deletions
38
packages/special-pages/pages/duckplayer/src/locales/da/duckplayer.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{ | ||
"smartling" : { | ||
"string_format" : "icu", | ||
"translate_paths" : [ | ||
{ | ||
"path" : "*/title", | ||
"key" : "{*}/title", | ||
"instruction" : "*/note" | ||
}] | ||
}, | ||
"alwaysWatchHere" : { | ||
"title" : "Åbn altid YouTube-videoer her", | ||
"note" : "label text for a checkbox that enables this feature for all videos, not just the current one" | ||
}, | ||
"keepEnabled" : { | ||
"title" : "Hold Duck Player slået til", | ||
"note" : "label text for a checkbox that enables this feature for all videos, not just the current one" | ||
}, | ||
"openInfoButton" : { | ||
"title" : "Åbn info", | ||
"note" : "aria label text on a button, to indicate there's more information to be shown if clicked" | ||
}, | ||
"openSettingsButton" : { | ||
"title" : "Åbn Indstillinger", | ||
"note" : "aria label text on a button, opens a screen where the user can change settings" | ||
}, | ||
"watchOnYoutube" : { | ||
"title" : "Se på YouTube", | ||
"note" : "text on a link that takes the user from the current page back onto YouTube.com" | ||
}, | ||
"invalidIdError" : { | ||
"title" : "<b>FEJL:</b> Ugyldigt video-ID", | ||
"note" : "Shown when the page URL doesn't match a known video ID. Note for translators: The <b> tag makes the word 'ERROR:' bold. Depending on the grammar of the target language, you might need to move it so that the correct word is emphasized." | ||
}, | ||
"tooltipInfo" : { | ||
"title" : "Duck Player giver en ren seeroplevelse uden målrettede annoncer og forhindrer, at visningsaktivitet påvirker dine YouTube-anbefalinger." | ||
} | ||
} |
38 changes: 38 additions & 0 deletions
38
packages/special-pages/pages/duckplayer/src/locales/de/duckplayer.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{ | ||
"smartling" : { | ||
"string_format" : "icu", | ||
"translate_paths" : [ | ||
{ | ||
"path" : "*/title", | ||
"key" : "{*}/title", | ||
"instruction" : "*/note" | ||
}] | ||
}, | ||
"alwaysWatchHere" : { | ||
"title" : "YouTube-Videos immer hier öffnen", | ||
"note" : "label text for a checkbox that enables this feature for all videos, not just the current one" | ||
}, | ||
"keepEnabled" : { | ||
"title" : "Duck Player aktiviert lassen", | ||
"note" : "label text for a checkbox that enables this feature for all videos, not just the current one" | ||
}, | ||
"openInfoButton" : { | ||
"title" : "Info öffnen", | ||
"note" : "aria label text on a button, to indicate there's more information to be shown if clicked" | ||
}, | ||
"openSettingsButton" : { | ||
"title" : "Einstellungen öffnen", | ||
"note" : "aria label text on a button, opens a screen where the user can change settings" | ||
}, | ||
"watchOnYoutube" : { | ||
"title" : "Auf YouTube ansehen", | ||
"note" : "text on a link that takes the user from the current page back onto YouTube.com" | ||
}, | ||
"invalidIdError" : { | ||
"title" : "<b>FEHLER:</b> Ungültige Video-ID", | ||
"note" : "Shown when the page URL doesn't match a known video ID. Note for translators: The <b> tag makes the word 'ERROR:' bold. Depending on the grammar of the target language, you might need to move it so that the correct word is emphasized." | ||
}, | ||
"tooltipInfo" : { | ||
"title" : "Mit Duck Player kannst du dir ungestört und ohne personalisierte Werbung Inhalte ansehen. Er verhindert, dass das, was du dir ansiehst, deine YouTube-Empfehlungen beeinflussen." | ||
} | ||
} |
38 changes: 38 additions & 0 deletions
38
packages/special-pages/pages/duckplayer/src/locales/el/duckplayer.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{ | ||
"smartling" : { | ||
"string_format" : "icu", | ||
"translate_paths" : [ | ||
{ | ||
"path" : "*/title", | ||
"key" : "{*}/title", | ||
"instruction" : "*/note" | ||
}] | ||
}, | ||
"alwaysWatchHere" : { | ||
"title" : "Ανοίγετε πάντα τα βίντεο του YouTube εδώ", | ||
"note" : "label text for a checkbox that enables this feature for all videos, not just the current one" | ||
}, | ||
"keepEnabled" : { | ||
"title" : "Διατηρήστε το Duck Player ενεργοποιημένο", | ||
"note" : "label text for a checkbox that enables this feature for all videos, not just the current one" | ||
}, | ||
"openInfoButton" : { | ||
"title" : "Ανοίξτε για πληροφορίες", | ||
"note" : "aria label text on a button, to indicate there's more information to be shown if clicked" | ||
}, | ||
"openSettingsButton" : { | ||
"title" : "Άνοιγμα ρυθμίσεων", | ||
"note" : "aria label text on a button, opens a screen where the user can change settings" | ||
}, | ||
"watchOnYoutube" : { | ||
"title" : "Παρακολούθηση στο YouTube", | ||
"note" : "text on a link that takes the user from the current page back onto YouTube.com" | ||
}, | ||
"invalidIdError" : { | ||
"title" : "<b>ΣΦΑΛΜΑ:</b> Μη έγκυρο αναγνωριστικό βίντεο", | ||
"note" : "Shown when the page URL doesn't match a known video ID. Note for translators: The <b> tag makes the word 'ERROR:' bold. Depending on the grammar of the target language, you might need to move it so that the correct word is emphasized." | ||
}, | ||
"tooltipInfo" : { | ||
"title" : "Το Duck Player παρέχει μια καθαρή εμπειρία προβολής χωρίς εξατομικευμένες διαφημίσεις, ενώ εμποδίζει τη δραστηριότητα προβολής να επηρεάσει τις συστάσεις που θα λαμβάνετε στο YouTube." | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
packages/special-pages/pages/duckplayer/src/locales/es/duckplayer.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{ | ||
"smartling" : { | ||
"string_format" : "icu", | ||
"translate_paths" : [ | ||
{ | ||
"path" : "*/title", | ||
"key" : "{*}/title", | ||
"instruction" : "*/note" | ||
}] | ||
}, | ||
"alwaysWatchHere" : { | ||
"title" : "Abrir siempre los vídeos de YouTube aquí", | ||
"note" : "label text for a checkbox that enables this feature for all videos, not just the current one" | ||
}, | ||
"keepEnabled" : { | ||
"title" : "Mantener Duck Player activado", | ||
"note" : "label text for a checkbox that enables this feature for all videos, not just the current one" | ||
}, | ||
"openInfoButton" : { | ||
"title" : "Abrir información", | ||
"note" : "aria label text on a button, to indicate there's more information to be shown if clicked" | ||
}, | ||
"openSettingsButton" : { | ||
"title" : "Abrir ajustes", | ||
"note" : "aria label text on a button, opens a screen where the user can change settings" | ||
}, | ||
"watchOnYoutube" : { | ||
"title" : "Ver en YouTube", | ||
"note" : "text on a link that takes the user from the current page back onto YouTube.com" | ||
}, | ||
"invalidIdError" : { | ||
"title" : "<b>ERROR:</b> ID de vídeo no válida", | ||
"note" : "Shown when the page URL doesn't match a known video ID. Note for translators: The <b> tag makes the word 'ERROR:' bold. Depending on the grammar of the target language, you might need to move it so that the correct word is emphasized." | ||
}, | ||
"tooltipInfo" : { | ||
"title" : "Duck Player ofrece una experiencia de visualización limpia sin anuncios personalizados e impide que la actividad de visualización influya en tus recomendaciones de YouTube." | ||
} | ||
} |
38 changes: 38 additions & 0 deletions
38
packages/special-pages/pages/duckplayer/src/locales/et/duckplayer.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{ | ||
"smartling" : { | ||
"string_format" : "icu", | ||
"translate_paths" : [ | ||
{ | ||
"path" : "*/title", | ||
"key" : "{*}/title", | ||
"instruction" : "*/note" | ||
}] | ||
}, | ||
"alwaysWatchHere" : { | ||
"title" : "Ava YouTube'i videod alati siin", | ||
"note" : "label text for a checkbox that enables this feature for all videos, not just the current one" | ||
}, | ||
"keepEnabled" : { | ||
"title" : "Hoia Duck Player sisse lülitatud", | ||
"note" : "label text for a checkbox that enables this feature for all videos, not just the current one" | ||
}, | ||
"openInfoButton" : { | ||
"title" : "Ava teave", | ||
"note" : "aria label text on a button, to indicate there's more information to be shown if clicked" | ||
}, | ||
"openSettingsButton" : { | ||
"title" : "Ava seaded", | ||
"note" : "aria label text on a button, opens a screen where the user can change settings" | ||
}, | ||
"watchOnYoutube" : { | ||
"title" : "Vaata YouTube'is", | ||
"note" : "text on a link that takes the user from the current page back onto YouTube.com" | ||
}, | ||
"invalidIdError" : { | ||
"title" : "<b>VIGA:</b> vale video ID", | ||
"note" : "Shown when the page URL doesn't match a known video ID. Note for translators: The <b> tag makes the word 'ERROR:' bold. Depending on the grammar of the target language, you might need to move it so that the correct word is emphasized." | ||
}, | ||
"tooltipInfo" : { | ||
"title" : "Duck Player pakub isikupärastatud reklaamidest vaba vaatamiskogemust ja takistab, et vaatamisaktiivsus mõjutaks sinu YouTube'i soovitusi." | ||
} | ||
} |
38 changes: 38 additions & 0 deletions
38
packages/special-pages/pages/duckplayer/src/locales/fi/duckplayer.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{ | ||
"smartling" : { | ||
"string_format" : "icu", | ||
"translate_paths" : [ | ||
{ | ||
"path" : "*/title", | ||
"key" : "{*}/title", | ||
"instruction" : "*/note" | ||
}] | ||
}, | ||
"alwaysWatchHere" : { | ||
"title" : "Avaa YouTube-videot aina täällä", | ||
"note" : "label text for a checkbox that enables this feature for all videos, not just the current one" | ||
}, | ||
"keepEnabled" : { | ||
"title" : "Pidä Duck Player käytössä", | ||
"note" : "label text for a checkbox that enables this feature for all videos, not just the current one" | ||
}, | ||
"openInfoButton" : { | ||
"title" : "Avaa tiedot", | ||
"note" : "aria label text on a button, to indicate there's more information to be shown if clicked" | ||
}, | ||
"openSettingsButton" : { | ||
"title" : "Avaa asetukset", | ||
"note" : "aria label text on a button, opens a screen where the user can change settings" | ||
}, | ||
"watchOnYoutube" : { | ||
"title" : "Katso YouTubessa", | ||
"note" : "text on a link that takes the user from the current page back onto YouTube.com" | ||
}, | ||
"invalidIdError" : { | ||
"title" : "<b>VIRHE:</b> virheellinen videotunnus", | ||
"note" : "Shown when the page URL doesn't match a known video ID. Note for translators: The <b> tag makes the word 'ERROR:' bold. Depending on the grammar of the target language, you might need to move it so that the correct word is emphasized." | ||
}, | ||
"tooltipInfo" : { | ||
"title" : "Duck Player tarjoaa puhtaan katselukokemuksen ilman kohdennettuja mainoksia ja estää katseluhistoriaa vaikuttamasta YouTube-suosituksiisi." | ||
} | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I moved this configuration into the script - so instead of the flags, we just list out all the projects requiring the bundled translations