Tags: emmekappa/next-translate
Tags
fix getServerSideProps loading on dynamic page with HOC (aralroca#426) * fix getServerSideProps loading on dynamic page with HOC * Add more cases
Merge branch 'canary' of github.com:vinissimus/next-translate into ca… …nary
Merge pull request aralroca#417 from vinissimus/canary release 1.0.1
Use env var to change the working directory instead of double config (a… …ralroca#409) * Use env var to change the working directory instead of double config * Fix link on README.md
Allow env variable for cwd (aralroca#406) * Allow env variable for cwd * Fix
Canary (aralroca#390) * Fix plurals (aralroca#347) * Add plurals: zero, one, two, few, many, other * Update node support * Update node support * Update node support * Fix withTranslation type (aralroca#354) * Replace CLI to next plugin + move project to typescript + refactor (aralroca#359) * [WIP] Implement webpack loader * Update .gitignore * Implement loader when the _app.js has a getInitialProps * Add missing pages on example * Remove builder tests right now * Fix default loadLocaleFrom on _app.js * Implement src/_loader/hasGetInitialPropsOnAppJs.js * add I18nProvider on top of _app.js if _app.js exist * Load default app.js with I18nProvider * Remove all deprecations from 0.19 * Implement loading namespaces from getInitialProps on pages * Refactor * Refactor loader * Add tests + improve templateWithHoc * Update dependences * Implement basic template with loader * Fix case of getServerSideProps * Fix no export default * Add loadNamespaces + refactor + add snapshots * Add test cases + fix cases for getStaticProps and getServerSideProps * Add more test cases + fix more cases about global exports * Fix appWithI18n * Update .npmignore * [WIP] migrate to TypeScript * Fix loader * Apply fixes on index.js * Fix tests * add experimental version * Implement logBuild * Update package version to 1.0.0-experimental.6 * Add esModuleInterop=true * Update tsconfig.json * Add warnings * Do dynamic prop from DynamicNamespace transparent * Implement fallbacks (aralroca#333) * Add fallback typescript type (aralroca#334) * Add fallback typescript type * Update index.d.ts * Update index.d.ts * Implement default namespace on useTranslation hook (aralroca#335) * Improve type * Fix Trans type * Update dependencies * Support components trans as object (aralroca#336) * Support Trans 'components' property to be an object * Fix docs * Fix when _app.js is missing * Change way to load webpack loader * Modify todo list * Remove next/app from appWithI18n + refactor * Update docs * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update plurals docs * Add migration guide `0.x` to `1.0.0` (aralroca#349) * Add migration guide `0.x` to `1.0.0` * Fix plural section * Add yarn command * docs: add dislick as a contributor (aralroca#350) * docs: update README.md [skip ci] * docs: update .all-contributorsrc [skip ci] Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> * Improve docs * Update README.md * Fix src/pages in experimiental 1.0 (aralroca#352) * Update examples + some fixes * Improve example * Improve examples * Add warning about getInitialProps on pages * add notes about appWithI18n on the migration guide * Add useful links to the migration guide * Fix imports from webpack loader in windows (aralroca#355) * Fix imports from webpack loader in windows * Fix clean helper on tests * Fix clean helper on tests * Fix comma * Fix test * Use webpack alias for absolute imports * Move plugin files to typescript * Update package version Co-authored-by: Patrick <[email protected]> Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> * Update README with the new examples (aralroca#360) * Update README with the new examples * Add quotes * fix: compiled page pathname in windows (aralroca#362) * fix: compiled page name in windows * Update src/plugin/loader.ts Co-authored-by: Aral Roca Gomez <[email protected]> Co-authored-by: Aral Roca Gomez <[email protected]> * docs: add vimutti77 as a contributor (aralroca#363) * docs: update README.md [skip ci] * docs: update .all-contributorsrc [skip ci] Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> Co-authored-by: Aral Roca Gomez <[email protected]> * Update package version * Change config way i18provider (aralroca#369) * Change way to use i18n config inside I18nProvider * Add default * Merge nested configs in nester I18nProviders (aralroca#370) * Fix _app.js with class extended from NextApp (aralroca#371) * Update CONTRIBUTING.md * Clean build plugin packages (aralroca#372) * Add support to customize the interpolation delimeter (aralroca#373) * Add support for nesting translations (aralroca#368) * Add support for nesting translations * Add a nested version of translations example * Add support for numbers in the nested keys * docs: add josephfarina as a contributor (aralroca#374) * docs: update README.md [skip ci] * docs: update .all-contributorsrc [skip ci] * docs: update README.md [skip ci] * docs: update .all-contributorsrc [skip ci] Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> Co-authored-by: Aral Roca Gomez <[email protected]> * Update README.md * Update README.md * Update package version * Update README * Update README.md * Update README.md * Update example adding custom interpolation (aralroca#375) * Re-add Translate type (aralroca#376) * Improve interface Translate (aralroca#377) The interface "Translate" describes the "translate" function in three variants. In the following the variants of the return values of the function are considered. 1. the return value corresponds to a string or an object (of any complexity) - string | object In the case of an object, the return type (string | object) requires a type cast from the function's user Example 1 const translatedObject: TypeOfTranslatedObject = t( translationKey, {}, {returnObjects: true} ); example 2 const translatedObject = t( translationKey, {}, {returnObjects: true} ) as TypeOfTranslatedObject; To make the use of the function more intuitive, the object type of the object to be translated is passed to the function call as generic type parameter. Example 1 - Return of a simple object of the type TypeOfTranslatedObject const translatedObject = t<TypeOfTranslatedObject>( translationKey, {}, {returnObjects: true} ); Example 2 - Return of an array whose contents correspond to the object type TypeOfTranslatedObject const translatedObject = t<Array<TypeOfTranslatedObject>>( translationKey, {}, {returnObjects: true} ); The change made in the commit, - introduces a generic type parameter and its initialization to a string, - the type parameter is optional. If no type parameter is specified by the caller, the default value string is used. The return value of the second and third variant corresponds to a string only and no other type. The change made in the commit - removes the generic type declaration, there is only one return type, - an override from outside is not possible. Co-authored-by: gurkerl83 <[email protected]> * docs: add gurkerl83 as a contributor (aralroca#378) * docs: update README.md [skip ci] * docs: update .all-contributorsrc [skip ci] Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> Co-authored-by: Aral Roca Gomez <[email protected]> * Add bundle analyzer to the complex example (aralroca#379) * Fix package (aralroca#380) * Fix package * Move types to the root * Add (getT) to get the t function outside components / pages (aralroca#383) * Support to consume t function outside React * fix typo * Fix issue with Node 10 (aralroca#386) * Update README.md * Update package version Co-authored-by: Patrick <[email protected]> Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> Co-authored-by: Vantroy <[email protected]> Co-authored-by: Joey <[email protected]> Co-authored-by: gurkerl83 <[email protected]> Co-authored-by: gurkerl83 <[email protected]>
PreviousNext