From 3a6cd6882ed701d8a0e4e7da4ede5efbcc4bcd8e Mon Sep 17 00:00:00 2001 From: Gabriel Francisco Date: Tue, 11 Jan 2022 13:10:37 -0300 Subject: [PATCH] (wip) Brazilian portuguese translation --- locales/ptbr.json | 157 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 157 insertions(+) create mode 100644 locales/ptbr.json diff --git a/locales/ptbr.json b/locales/ptbr.json new file mode 100644 index 0000000..5476f5c --- /dev/null +++ b/locales/ptbr.json @@ -0,0 +1,157 @@ +{ + "common.or": "ou", + "common.and": "e", + "main.title": "Svelte Intl Precompile", + "main.subtitle": "A biblioteca de i18n para Svelte que analisa e compila suas traduções em tempo de compilação", + "playground.title": "Playground", + + "introduction.title": "Introdução", + "introduction.subsection.why-use-it": "Por que você usaria?", + "introduction.paragraph.why-use-it-1": "Svelte-intl-precompile is an i18n library for Svelte apps that aims to provide all the features your app may need with the smallest possible penalty in both app size and runtime performance.", + "introduction.paragraph.why-use-it-2": "To accomplish that it takes a different approach to most internalization libraries. Much like Svelte.js analyzes and understands your code and at build time compiles it to minimal and efficient javascript, this library inspects your translations defined in the ICU message syntax and compiles them to small and efficient inline functions.", + "introduction.paragraph.why-use-it-3": "If you use each and every feature supported by the ICU message syntax it will add around 2kb to your bundle after minification and compression. If you only use a few, it can go as low as 1kb.", + "introduction.paragraph.why-use-it-4": "Since it doesn't have to parse and tokenize your translations in the browser, it is also faster. Around 4 times faster rendering a translation for the first time, and around 50% faster for already known translations.", + "introduction.subsection.playground": "What? Show me the code", + "introduction.paragraph.playground-preface": "There, play with it. Paste your own translations and see the transformed output.", + "introduction.subsection.features": "What features does it have?", + "introduction.paragraph.features-1": "All the features supported by the ICU message syntax are supported.
It has an API almost completely compatible with", + "introduction.paragraph.features-2": ", another very popular and well designed internationalization library for Svelte.js ", + "introduction.paragraph.features-3": "Its main features include:", + "introduction.list-items.features-1": "Translations with interpolation, selected sub-translations and all ICU features.", + "introduction.list-items.features-2": "Formatters for dates, tims, numbers, ordinals y currencies all leveraging the native Intl API available in modern browsers and node.", + "introduction.list-items.features-3": "A svelte-oriented API providing convenient to use stores that update automatically when locale or translations change.", + "introduction.list-items.features-4": "A range functions to load locales asynchronously when needed or to extract the default locale from the request headers in SSR mode.", + "introduction.list-items.features-5": "Full tree-shaking of all the above features that your app doesn't use.", + + "icu-crash-course.title": "ICU syntax crash course", + "icu-crash-course.table-heads.definition": "Entry", + "icu-crash-course.table-heads.values": "Values", + "icu-crash-course.table-heads.output": "Output", + "icu-crash-course.paragraph.main-1": "This library analyzes and compiles the translations authored in the ICU message syntax. While the ICU message syntax is an independent project this is an accelerated course on why it's good and how to use the main features.", + "icu-crash-course.subsection.why": "Why use the ICU message syntax?", + "icu-crash-course.paragraph.why-1": "ICU stands for International Components for Unicode. While its popularity begun in C/C++ and Java, it's the javascript ecosystem where it has become the defacto standard for internationalization, although it's also popular in Python and PHP.", + "icu-crash-course.paragraph.why-2": "Internationalizing apps is a whole lot more than just mapping some keys to the appropriate translated string in a dictionary. Properly internationalized apps must handle all aspects of translation, including the way dates and times are formatted, what delimiters are used in numbers to separate the thousands or the decimals, currencies and support gendered languages.", + "icu-crash-course.paragraph.why-3": "Even something as simple as plurals can get very complex depending on the language. English, German and Spanish have singular and plural, but some slavic languages have 3, and other languages like Arabic have 6 depending on the number of items being pluralized. Sometimes the threshold where we have to change from one plural form to the next varies depending on the regional variant.
English doesn't have many gendered words but French or Italian do, and the adjectives must match the noun's gender. Formatting 123456789 in the US english variant will result in 123,456,789 but in the Indian variant will be 12,34,56,789.
Formatting currencies the $ symbol goes before the amount, but the € goes after.", + "icu-crash-course.paragraph.why-4": "The ICU syntax abstracts all this complexity from the developers and gives the real professional translators a meta language expressive enough to handle all the subtleties on they side.", + "icu-crash-course.subsection.interpolations": "Interpolations", + "icu-crash-course.paragraph.interpolations-1": "ICU messages support interpolating values, which will be properly sanitized so passing undefined will not interpolate as \"undefined\".", + "icu-crash-course.table-cells.interpolations": "Your favorite color is {chosen}", + "icu-crash-course.subsection.plurals": "Plurals", + "icu-crash-course.paragraph.plurals-1": "The second most used feature in any app is pluralization. The ICU syntax has a dedicated plural helper to define plural translations that from very simple to quite complicated, all within the translation itself.", + "icu-crash-course.paragraph.plurals-2": "Each path for the plural is prefixed with the numeric qualifier. The possible qualifiers are:", + "icu-crash-course.paragraph.plurals-3": "Lets see some examples first:", + "icu-crash-course.paragraph.plurals-4": "Some languages like English only leverage one and other but others will be able to use the best plural form. The particular threshold value that divides few and many is heavily cultural.", + "icu-crash-course.paragraph.plurals-5": "You can also specify translations for exact values using =N. When a number is specified that way that translation will supersede the language's default behavior.
For instance, in english you could use =2 or =12 to have different translations specifically for a couple and a dozen instead of using the generic plural.", + "icu-crash-course.paragraph.plurals-6": "Lastly, plurals can also make us of the hashtag to print as number the value being used in the plural, and optionally the helper can receive an offset that will be substracted to the value in the hashtag.", + "icu-crash-course.list-items.one": "(singular)", + "icu-crash-course.list-items.two": "(dual)", + "icu-crash-course.list-items.few": "(paucal)", + "icu-crash-course.list-items.many": "(Also used for fractions)", + "icu-crash-course.list-items.other": "(general plural form. The one used on languages with only one plural)", + "icu-crash-course.table-cells.plurals-simple": "Your have {numCats, plural, one {one cat} other {# cats}}", + "icu-crash-course.table-cells.plurals-complex": "Your have {numCats, plural, =0 {no cats at all} one {one single cat} =2 {a couple cats} =3 {a trio of cats} =12 {a dozen cats} other {exactly # cats}}", + "icu-crash-course.table-cells.plurals-offset": "{guestCount, plural, offset:1 =0 {Mary does not give a party.} =1 {Mary invites {guest} to her party.} =2 {Mary invites {guest} and one other person to her party.} other {Mary invites {guest} and # other people to her party.}}", + "icu-crash-course.subsection.select": "Select", + "icu-crash-course.paragraph.select-1": "The select helper is used to choose among several translation paths depending on an argument.
While it has many possible uses the most common one is for having gendered translations.", + "icu-crash-course.table-cells.select": "Your {childGender, select, male {son} female {daughter} other {child}} has won an award", + "icu-crash-course.table-cells.select-value-male": "Male", + "icu-crash-course.table-cells.select-value-female": "Female", + "icu-crash-course.table-cells.select-value-unknown": "Unknown", + "icu-crash-course.subsection.date": "Dates", + "icu-crash-course.paragraph.date-1": "This helper is used to format dates according to the current locale one of the default formats or the custom ones you added when configuring the app.
The default format are:", + "icu-crash-course.list-items.short": ": The most compact date representation", + "icu-crash-course.list-items.medium": ": Abbreviated textual representation", + "icu-crash-course.list-items.long": ": Long textual representation", + "icu-crash-course.list-items.full": ": The most verbose and complete date", + "icu-crash-course.table-cells.date": "Your next holidays start on {holidayStart, date, full}", + "icu-crash-course.subsection.time": "Times", + "icu-crash-course.paragraph.time": "Just like the date helpers but for formatting only the time part of a date.", + "icu-crash-course.table-cells.time": "Your doctor's appointment is today at {appointment, time, short}", + "icu-crash-course.subsection.number": "Numbers", + "icu-crash-course.paragraph.number": "Formats a number according to the rules of the current locale.", + "icu-crash-course.table-cells.number": "Your account balance is {num, number}", + + + "getting-started.title": "Getting started", + "getting-started.subsection.installation": "Installation", + "getting-started.paragraph.installation-1": "Install svelte-intl-precompile as a runtime dependency of your sveltkit app.", + "getting-started.subsection.create-translations": "Create your translations", + "getting-started.paragraph.create-translations-1": "Next create a folder to put your translations files in. I like to use {dir1} {or} {dir2}", + "getting-started.paragraph.create-translations-2": "at the root of the project, but really any folder will do.", + "getting-started.paragraph.create-translations-3": "I recommend using JSON files but you can use use javascript with an object as their default export. Whatever the file extension, you translations inside are just regular strings in the ICU message syntax:", + "getting-started.paragraph.create-translations-4": "I prefer when the dictionary has a single level and using dots to create hierarchies like in the one above, but you can also nest objects like in the next example:", + "getting-started.paragraph.create-translations-5": "JSON is too constrained! I want more flexibility!", + "getting-started.paragraph.create-translations-6": "You can also use JSON 5 features in your json files. That is, you can have comments, multi-line strings, single quotes, trailing commas...
It just works out of the box.", + "getting-started.paragraph.create-translations-7": "I don't like curly braces", + "getting-started.paragraph.create-translations-8": "Fair enough. If you like significant whitespace you can also use YAML files. Just use the .yaml or .yml extension names. If you are into that sort of things.", + "getting-started.paragraph.create-translations-9": "I want even more features", + "getting-started.paragraph.create-translations-10": "You can also define your translation in .js files, .ts files and .mjs files. Your module must export the object with the translations as its default export.", + "getting-started.subsection.hook-into-sveltekit": "Hook the compiler into SvelteKit", + "getting-started.paragraph.hook-into-sveltekit-1": "This library's build time compiler needs to hook into the build pipeline of your app. For that, add it to the list of vite plugins in your {path}", + "getting-started.paragraph.hook-into-sveltekit-2": "You are set, time to use the library.", + "getting-started.subsection.hook-into-vite": "Hook the compiler into plain Vite.js", + "getting-started.paragraph.hook-into-vite-1": "If you are not using SvelteKit but raw Vite.js, the configuration is very similar. At the end SvelteKit uses Vite.js underneath. Import the compiler and pass it to the list of plugins in {path}", + + "configuration.title": "Configuration", + "configuration.subsection.example": "Configuration example", + "configuration.link.example": "Example", + "configuration.paragraph.example-1": "This is the minimal working example of the library's initialization. Put this in your", + "configuration.paragraph.example-2": "file.", + "configuration.paragraph.example-3": "This will get you going but lets dive deeper on it more.", + "configuration.subsection.static-locales": "Load locales statically", + "configuration.paragraph.static-locales-1": "Like in the previous example, the easiest way to add your translation keys is to just import them as modules and register them using", + "configuration.paragraph.static-locales-2": "Note that despite the fact that you defined your translations in JSON files, in here you are importing them as javascript modules from", + "configuration.paragraph.static-locales-3": ". This is because the compiler has transformed your translations into a module with inline functions at built time.", + "configuration.paragraph.static-locales-4": "This approach is loading all those languages even if only one is being displayed. Usually okay when kicking out a new project or if you only have a few of keys, but when your app grows you should start loading languages on demand.", + "configuration.subsection.dynamic-locales": "Load locales dynamically", + "configuration.paragraph.dynamic-locales-1": "Once you have a significant amount of translations and many locales it would be very wasteful to load every possible language for every possible user when they will only see their selected one. The library has a", + "configuration.paragraph.dynamic-locales-2": "function to dynamically import languages when the user selects it and a", + "configuration.paragraph.dynamic-locales-3": "to wait for locales to be loaded.", + "configuration.paragraph.dynamic-locales-4": "If all your locales are dynamically loaded you want to stop the page from rendering initial locale has loaded. Calling it in Svete's", + "configuration.paragraph.dynamic-locales-5": "function with do exactly that.", + "configuration.subsection.dynamic-locales-shorthand": "Load locales dynamically (but shorter this time)", + "configuration.paragraph.dynamic-locales-shorthand-1": "If you just want to register all your available locales (all the locales for which you have a JSON file with translations) automatically, there's a nice shorthand for that. The", + "configuration.paragraph.dynamic-locales-shorthand-2": "folder for your translations doubles down as a module from which you can import two utilities: ", + "configuration.paragraph.dynamic-locales-shorthand-3": "The first one is a function that when invoked is equivalent to calling", + "configuration.paragraph.dynamic-locales-shorthand-4": "for all your locales.
The second one is an array of the available locales (wether you've registered them or not), for whatever use you might want to put them to.", + "configuration.subsection.init": "Default & fallback locales", + "configuration.paragraph.init-1": "To the call to", + "configuration.paragraph.init-2": "the most important options are", + "configuration.paragraph.init-3": ". The first determines the locale in which the app will be initially rendered and the second the locale that will be checking when a translation is not found in the currently selected locale.", + "configuration.paragraph.init-4": "There's a lot we can do to achieve the best experience, like smartly initializing the", + "configuration.paragraph.init-5": "to the users' configured locale if they are logged, read it from a cookie in case they are repeating visitors or choose it based on the requests
Accept-Language
header when doing SSR, but the most straigtforward is to detect it from the browser or the URL with the provided utility functions.", + "configuration.subsection.find-locale": "Find the best locale", + "configuration.paragraph.find-locale-1": "There are many valid strategies to select the best locale to pass to the", + "configuration.paragraph.find-locale-2": "function. This library provides helpers for the most common ones:", + "configuration.definitions.navigator": "Extracts the locale from browser, which in turn is the operative systems' locale.", + "configuration.definitions.query": "Extracts the locale on the given key of the query string of the URL.
E.g
getLocaleFromQueryString('lang')
for
/users?sort=name&dir=asc&lang=es
", + "configuration.definitions.hash": "Like
getLocaleFromQueryString
but for the URL hash.
E.g
getLocaleFromHash('lang')
for
/users#sort=name&dir=asc&lang=es
", + "configuration.definitions.path": "Extracts the locale from the path of the URL.
E.g
getLocaleFromPathname(/^\/((es|en)(-\\w\\w)?)/)
for
myapp.com/en-US/users
", + "configuration.definitions.host": "Extracts the locale from host.
E.g
getLocaleFromHostname(/^((es|en)(-\\w\\w)?)\\./)
for
https://pt.myapp.com
", + "configuration.subsection.custom-formats": "Custom formats", + "configuration.paragraph.custom-formats-1": "This library can format numbers, dates and times. It does it without adding significant weight to your app by leveraging the Intl API already present in all modern browsers and in Node.js.
By default you app can use these formats, but you can add your own.", + "configuration.paragraph.custom-formats-2": "If you want to define your own formats pass them on initialization using the", + "configuration.paragraph.custom-formats-3": "option, which will be deep merged with the default formats listed above. The formats must be valid options to forward to", + + "usage.title": "Usage", + "usage.paragraph.preface-1": "The runtime API of this library is mostly taken from the great", + "usage.paragraph.preface-2": ", to the point that in most cases you can switch from svelte-i18 to svelte-intl-precompile and vice versa without touching your application other than updating the import path of the utilities.", + "usage.paragraph.preface-3": "Its store-centric API is particularly nice to use in templates and provides the added benefit of making your entire app reactive, automatically updating every translation when the user selects another locale or when more dictionary entries are loaded. For the following examples assume that we're working on an app containing these translations.", + "usage.link.basic-translations": "Basic translations", + "usage.subsection.basic-translations": "Basic translations: The
$t(key, ops)
store.", + "usage.paragraph.basic-translations-1": "This store is the one you will use the most. Just import it and use it as a function, passing in the translation key.", + "usage.subsection.passing-arguments": "Passing arguments", + "usage.paragraph.passing-arguments-1": "The second argument received by the", + "usage.paragraph.passing-arguments-2": "is an object. Any argument used by your translation will be passed in the", + "usage.paragraph.passing-arguments-3": "key.", + "usage.paragraph.passing-arguments-4": "There is no difference if the given parameters are just interpolated, used for in plural/select or are number, dates or times to be formatted. All aguments are passed the same way.", + "usage.subsection.formatting": "Formatting dates, times and numbers", + "usage.paragraph.formatting-1": "While you can pass number, dates and times to your translations that will be formatted following your preferences, this library also has stores to conveniently format them directly from your javascript code.", + "usage.subsection.other-stores": "Other stores", + "usage.paragraph.other-stores-1": "There are three more stores worth mentioning:", + "usage.paragraph.other-stores-2": "Lets build a component to change the current locale.", + "usage.paragraph.other-stores-3": "The code above is quite straigtforward. We just iterate the list of available locales in $locales rendering a button for each one. Clicking on a button will set the current locale in $locale to the new value.
Every translation in the app will update without refreshing the page.", + "usage.definitions.other-stores-1": "Can be used to read or write the current locale (E.g:
\"es-ES\"
).", + "usage.definitions.other-stores-2": "Contains an array of all the available locales (E.g:
[\"es-ES\", \"en\", \"pt-BR\"]
).", + "usage.definitions.other-stores-3": "Contains
true
when an asynchronous locale is still being loaded." +}