:orange_book: simple approach for javascript localization

Overview

ttag

travis codecov downloads

NPM

⚠️ This project was previously named c-3po. Some of the talks, presentations, and documentation may reference it with both names.

Modern javascript i18n localization library based on ES6 tagged templates and the good old GNU gettext

Key features

  • Uses ES6 template literals for string formatting (no need for sprintf).
  • Contexts support
  • It can precompile translations on a build step.
  • Plurals support ngettext.
  • It can be integrated in any build tool that works with babel.
  • Has a builtin validation for translated strings format.
  • It can use any default locale in sources (not only English).
  • Handles React (jsx) translations.
  • Can be easily integrated with Create React App. CRA doc

Usage example

import { t, ngettext, msgid } from 'ttag'

// formatted strings
const name = 'Mike';
const helloMike = t`Hello ${name}`;

// plurals (works for en locale out of the box)
const n = 5;
const msg = ngettext(msgid`${ n } task left`, `${ n } tasks left`, n)

Installation

npm install --save ttag

CLI

You may also need to install ttag-cli for po files manipulation.

ttag cli - https://github.com/ttag-org/ttag-cli

npm install --save-dev ttag-cli

Usage from CDN

https://unpkg.com/ttag/dist/ttag.min.js

This project is designed to work in pair with babel-plugin-ttag.
But you can also play with it without transpilation.

Useful links

Tutorials

Slides from talks

Talks

Comments
  • react translations

    react translations

    think about how we can handle something like:

        Нажмите <a onClick={this.handleClick}>здесь</a>.
    

    maybe this can be an option

    <translate>
        Нажмите <a onClick={this.handleClick}>здесь</a>.
    </translate>
    

    extracted result

    msgid "Нажмите <to>здесь<tc>"
    msgstr ""
    

    Example 2

    Осталось: <span>{this.props.complainTextSymbolsLeft}</span>
                        {ungettext([' символ', ' символа', ' символов'], this.props.complainTextSymbolsLeft)}.
    

    to - tag open tc - tag close

    enhancement babel-plugin c-3po-lib 
    opened by AlexMost 21
  • Suitable for Node/express?

    Suitable for Node/express?

    ttag looks like a great module for managing translations. I wonder if it's suitable for Node/express environment where the locale is determined on per request basis?

    From this example, https://ttag.js.org/docs/typescript.html#runtime-load it looks like it's only possible to define the locale globally?

    import { ngettext, msgid, t, addLocale, useLocale } from 'ttag';
    
    const locale = process.env.LOCALE; // uk
    
    if (locale) {
        const translationObj = require(`./${locale}.po.json`); // will load uk.po.json
        addLocale(locale, translationObj); // adding locale to ttag
        useLocale(locale); // make uk locale active
    }
    
    opened by OrKoN 14
  • New name - new life

    New name - new life

    Issue - https://github.com/c-3po-org/c-3po/issues/104 So we need to decide how we should rename this project, to avoid legal infringement.

    My thoughts about the new name (can be discussed here also):

    • short (3 - 5 characters).
    • does not contain translation, localization, i18n in its name.
    • there should be no existing trademark with that name.
    • available package name on the npm.

    Feel free to suggest your ideas @MrOrz @vharitonsky @alxpy @erickwilder

    opened by AlexMost 13
  • Possible legal infringement?

    Possible legal infringement?

    Hello @AlexMost

    I've been looking for some ways to do translations using a similar workflow as I'm used to with GNU gettext in other environments (e.g: Python, PHP, Ruby) and I think c3po could find a very good balance between supporting it and also putting JS first.

    I have a question and I hope you don't mind that I'm using this space here in the issue tracking for that. I also want to give a fair warning that it might be a bit controversial, but I do so in good faith.

    Does the name of the library can cause any possible future legal action? I really liked the name, just to be clear. It's awesome. But my concerns about it are towards possible, future legal actions that it might have. I'm not a lawyer, but I guess that some of the people at Disney would not be pleased to see both the name of the character (C3PO) and the picture of it in the organization profile. I'm asking this because every open source project I intend to use/support I do with a hope they'll be there for many years and that I could safely recommend in my work environment - which is not the case here. Unfortunately, as the gray areas appear on any legal aspects, most companies tend to be in the safe side. In this case, it is not adopting a great library like this one.

    question 
    opened by erickwilder 9
  • Allow any expression in localized strings?

    Allow any expression in localized strings?

    Only allowing variables and property accesses in localized strings feels limiting. Would it be possible to support any expression, and instead of using the expression in the extracted string use positional references like hello {0}, as is used in many other gettext implementations?

    opened by tlrobinson 9
  • support gettext extracted comments

    support gettext extracted comments

    Extracted comments (see --add-comments part of the gettext doc, or developer comments) can be helpful for developers to hint the translator about the translated string. It would be nice if we support such feature.

    /* this is foo */
    const foo =  t`pen pineapple apple pen`;
    
    const bar = /* hello world */ngettext(/* this is bar */ msgid`${n} time clicked`, `${n} times clicked`, n);
    
    

    Could extracts to something like:

    #. this is foo
    #: some-file
    msgid "pen pineapple apple pen"
    msgstr ""
    
    #. hello world
    #. this is bar
    #: some-file
    msgid "${ 0 } time clicked"
    msgid_plural "${ 0 } times clicked"
    msgstr[0] ""
    msgstr[1] ""
    
    enhancement 
    opened by MrOrz 9
  • How to interpolate JSX?

    How to interpolate JSX?

    Kinda related to https://github.com/ttag-org/ttag/issues/93,

    How do I localise:

    1. User %s not found where %s is meant to expand to <span>xxx</span>, or
    2. Please <a href="...">continue</a> to blah blah?

    I was thinking that for 1. t could perhaps return a fragment? For 2. I can't even think of a good syntax to express that both please and continue are to be translated...

    opened by dimaqq 8
  • `ngettext` causes unsafe-eval CSP error

    `ngettext` causes unsafe-eval CSP error

    Hello, on our application we don't allow eval in our CSP policy, so ngettext causes the following error:

    Uncaught EvalError: Refused to evaluate a string as JavaScript because 'unsafe-eval'
    
    at new Function (<anonymous>)
        at createPluralFunc (ttag.js:84)
        at getPluralFunc (ttag.js:84)
        at Config.getDefaultPluralFn (ttag.js:521)
        at Context.ngettext (ttag.js:727)
    

    it's possibly from https://github.com/ttag-org/ttag/blob/master/src/utils.js#L52 or https://github.com/ttag-org/plural-forms/blob/master/src/lib.js#L20

    Do you have any idea how to get around this issue without changing our CSP policy?

    opened by mmso 7
  • Contexts proposal

    Contexts proposal

    One of the main feature request from other people, who sees c-3po is the context feature. Context allows us to translate the same word (the same msgid) differently, depending on the context.

    For C, C++ there are separate functions for applying context to the translation: pgettext, npgettext (for single and plural forms accordingly)

    pgettext(<context>, <msgid>);
    pngettext(<context>, <single form>, <plural form>, <count>);
    

    As for me I don't like the idea of having separate functions for that. As it was designed for C initially, they almost had no other option. But we can make it better, so I would like to implement succinct API for the c-3po.

    Proposal 1

    To introduce special c function, that will return an object with all c-3po functions with applied context. It will accept context value as a first argument.

    import { c, t } from 'c-3po'
    c('context').t`Hello ${ user.name }`
    
    // maybe better to place it on a separate lines
    c('context')
    .t`Hello ${ user.name}`
    
    import { ngettext, msgid, c } from 'c-3po'
    c('context').ngettext(msgid`${ n } banana`, `${ n } bananas`, n);
    

    One thing that I am worried about, is that syntax becomes a little bit overloaded. But in general, I think context is not so frequent case. And with this apporach, it is clear how to introduce some other concepts like domains by just chaining them one after another.

    d('domain')
    .c('context')
    .t`translate me`
    

    Proposal 2

    Place context information right into the t function call;

    import { t } from 'c-3po'
    t('context')`Hello ${ user.name}`
    
    import { ngettext, msgid } from 'c-3po'
    ngettext('context')(msgid`${ n } banana`, `${ n } bananas`, n);
    

    This one looks a little bit cleaner that Proposal 1, but the question is how do we extend this to have domain info? Maybe something like this will work:

    t({context: 'context', domain: 'domain'})`Hello ${ user.name}`
    

    What do you think @MrOrz @alxpy @Suhoy95

    enhancement question babel-plugin c-3po-lib 
    opened by AlexMost 7
  • ttag-cli version 1.5.0 and up not working

    ttag-cli version 1.5.0 and up not working

    I am just approaching ttag for the first time (thank you for the nice library, by the way) and setting up some experiments. I just noticed some strange behavior with ttag-cli: it seems like all versions from 1.5.0 to 1.8.0 fail to extract translations, while 1.3.0-1 and 1.4.0 work correctly.

    For this experiment I am using the quickstart example, which I clone directly from github, but I tried with other simple JavaScript files, with same results:

    # Clone the repo to test the example
    cd /tmp
    git clone https://github.com/ttag-org/ttag.git
    cd ttag/examples/quickstart
    
    # Test version 1.4.0: this works correctly
    npm i [email protected] \
        && ./node_modules/.bin/ttag extract counter.js \
        && cat translations.pot
    
    # command output:
    # [ ... ]
    # + [email protected]
    # added 218 packages from 119 contributors in 17.49s
    # [ ... ]
    # ✔ [ttag] translations extracted to translations.pot
    # ... output of cat follows (file looks correct)
    # msgid ""
    # msgstr ""
    # "Content-Type: text/plain; charset=utf-8\n"
    # [ ... ]
    
    # Test version 1.5.0: this does not work, the file is empty
    npm i [email protected] \
        && ./node_modules/.bin/ttag extract counter.js \
        && cat translations.pot
    
    # command output:
    # [ ... ]
    # + [email protected]
    # added 315 packages from 135 contributors and audited 2604 packages in 10.746s
    # [ ... ]
    # ✔ [ttag] translations extracted to translations.pot
    # ... no more output from cat, file is empty
    
    bug 
    opened by matpen 6
  • Gatsby redux ttag integration problem

    Gatsby redux ttag integration problem

    This is my repo: https://github.com/bolonhadev/my-gosh-dev

    In './src/components/subscribe.js', I'm sending a 'dispatch function' (redux), called 'CHANGE_TO_PT' && 'CHANGE_TO_EN'. This is buttons to change language.

    That function calls './stc/states/Languages/reducer', I'm trying to use 'addLocale()' and 'useLocale()'. The paramns to these functions are well. I'm using the right params like 'language' and 'i18n/${myLanguage}.po.json'.

    But the site doesn't change the language. What do I have to do to fix this ?

    opened by miltonbolonha 6
  • Bump json5 from 2.1.0 to 2.2.3 in /examples/typescript

    Bump json5 from 2.1.0 to 2.2.3 in /examples/typescript

    Bumps json5 from 2.1.0 to 2.2.3.

    Release notes

    Sourced from json5's releases.

    v2.2.3

    v2.2.2

    • Fix: Properties with the name __proto__ are added to objects and arrays. (#199) This also fixes a prototype pollution vulnerability reported by Jonathan Gregson! (#295).

    v2.2.1

    • Fix: Removed dependence on minimist to patch CVE-2021-44906. (#266)

    v2.2.0

    • New: Accurate and documented TypeScript declarations are now included. There is no need to install @types/json5. (#236, #244)

    v2.1.3 [code, diff]

    • Fix: An out of memory bug when parsing numbers has been fixed. (#228, #229)

    v2.1.2

    • Fix: Bump minimist to v1.2.5. (#222)

    v2.1.1

    • New: package.json and package.json5 include a module property so bundlers like webpack, rollup and parcel can take advantage of the ES Module build. (#208)
    • Fix: stringify outputs \0 as \\x00 when followed by a digit. (#210)
    • Fix: Spelling mistakes have been fixed. (#196)
    Changelog

    Sourced from json5's changelog.

    v2.2.3 [code, diff]

    v2.2.2 [code, diff]

    • Fix: Properties with the name __proto__ are added to objects and arrays. (#199) This also fixes a prototype pollution vulnerability reported by Jonathan Gregson! (#295).

    v2.2.1 [code, diff]

    • Fix: Removed dependence on minimist to patch CVE-2021-44906. (#266)

    v2.2.0 [code, diff]

    • New: Accurate and documented TypeScript declarations are now included. There is no need to install @types/json5. (#236, #244)

    v2.1.3 [code, diff]

    • Fix: An out of memory bug when parsing numbers has been fixed. (#228, #229)

    v2.1.2 [code, diff]

    • Fix: Bump minimist to v1.2.5. (#222)

    v2.1.1 [code, [diff][d2.1.1]]

    ... (truncated)

    Commits
    • c3a7524 2.2.3
    • 94fd06d docs: update CHANGELOG for v2.2.3
    • 3b8cebf docs(security): use GitHub security advisories
    • f0fd9e1 docs: publish a security policy
    • 6a91a05 docs(template): bug -> bug report
    • 14f8cb1 2.2.2
    • 10cc7ca docs: update CHANGELOG for v2.2.2
    • 7774c10 fix: add proto to objects and arrays
    • edde30a Readme: slight tweak to intro
    • 97286f8 Improve example in readme
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump json5 and ttag-cli in /examples/quickstart

    Bump json5 and ttag-cli in /examples/quickstart

    Bumps json5 to 2.2.2 and updates ancestor dependency ttag-cli. These dependencies need to be updated together.

    Updates json5 from 0.5.1 to 2.2.2

    Release notes

    Sourced from json5's releases.

    v2.2.2

    • Fix: Properties with the name __proto__ are added to objects and arrays. (#199) This also fixes a prototype pollution vulnerability reported by Jonathan Gregson! (#295).

    v2.2.1

    • Fix: Removed dependence on minimist to patch CVE-2021-44906. (#266)

    v2.2.0

    • New: Accurate and documented TypeScript declarations are now included. There is no need to install @types/json5. (#236, #244)

    v2.1.3 [code, diff]

    • Fix: An out of memory bug when parsing numbers has been fixed. (#228, #229)

    v2.1.2

    • Fix: Bump minimist to v1.2.5. (#222)

    v2.1.1

    • New: package.json and package.json5 include a module property so bundlers like webpack, rollup and parcel can take advantage of the ES Module build. (#208)
    • Fix: stringify outputs \0 as \\x00 when followed by a digit. (#210)
    • Fix: Spelling mistakes have been fixed. (#196)

    v2.1.0

    • New: The index.mjs and index.min.mjs browser builds in the dist directory support ES6 modules. (#187)

    v2.0.1

    • Fix: The browser builds in the dist directory support ES5. (#182)

    v2.0.0

    • Major: JSON5 officially supports Node.js v6 and later. Support for Node.js v4 has been dropped. Since Node.js v6 supports ES5 features, the code has been rewritten in native ES5, and the dependence on Babel has been eliminated.

    • New: Support for Unicode 10 has been added.

    • New: The test framework has been migrated from Mocha to Tap.

    • New: The browser build at dist/index.js is no longer minified by default. A minified version is available at dist/index.min.js. (#181)

    • Fix: The warning has been made clearer when line and paragraph separators are used in strings.

    • Fix: package.json5 has been restored, and it is automatically generated and

    ... (truncated)

    Changelog

    Sourced from json5's changelog.

    v2.2.2 [code, diff]

    • Fix: Properties with the name __proto__ are added to objects and arrays. (#199) This also fixes a prototype pollution vulnerability reported by Jonathan Gregson! (#295).

    v2.2.1 [code, diff]

    • Fix: Removed dependence on minimist to patch CVE-2021-44906. (#266)

    v2.2.0 [code, diff]

    • New: Accurate and documented TypeScript declarations are now included. There is no need to install @types/json5. (#236, #244)

    v2.1.3 [code, diff]

    • Fix: An out of memory bug when parsing numbers has been fixed. (#228, #229)

    v2.1.2 [code, diff]

    • Fix: Bump minimist to v1.2.5. (#222)

    v2.1.1 [code, diff]

    • New: package.json and package.json5 include a module property so bundlers like webpack, rollup and parcel can take advantage of the ES Module build. (#208)
    • Fix: stringify outputs \0 as \\x00 when followed by a digit. (#210)
    • Fix: Spelling mistakes have been fixed. (#196)

    ... (truncated)

    Commits
    • 14f8cb1 2.2.2
    • 10cc7ca docs: update CHANGELOG for v2.2.2
    • 7774c10 fix: add proto to objects and arrays
    • edde30a Readme: slight tweak to intro
    • 97286f8 Improve example in readme
    • d720b4f Improve readme (e.g. explain JSON5 better!) (#291)
    • 910ce25 docs: fix spelling of Aseem
    • 2aab4dd test: require tap as t in cli tests
    • 6d42686 test: remove mocha syntax from tests
    • 4798b9d docs: update installation and usage for modules
    • Additional commits viewable in compare view

    Updates ttag-cli from 1.3.0-1 to 1.10.5

    Commits

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump express from 4.17.1 to 4.18.2 in /website

    Bump express from 4.17.1 to 4.18.2 in /website

    Bumps express from 4.17.1 to 4.18.2.

    Release notes

    Sourced from express's releases.

    4.18.2

    4.18.1

    • Fix hanging on large stack of sync routes

    4.18.0

    ... (truncated)

    Changelog

    Sourced from express's changelog.

    4.18.2 / 2022-10-08

    4.18.1 / 2022-04-29

    • Fix hanging on large stack of sync routes

    4.18.0 / 2022-04-25

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump qs from 6.5.2 to 6.5.3 in /website

    Bump qs from 6.5.2 to 6.5.3 in /website

    Bumps qs from 6.5.2 to 6.5.3.

    Changelog

    Sourced from qs's changelog.

    6.5.3

    • [Fix] parse: ignore __proto__ keys (#428)
    • [Fix] utils.merge: avoid a crash with a null target and a truthy non-array source
    • [Fix] correctly parse nested arrays
    • [Fix] stringify: fix a crash with strictNullHandling and a custom filter/serializeDate (#279)
    • [Fix] utils: merge: fix crash when source is a truthy primitive & no options are provided
    • [Fix] when parseArrays is false, properly handle keys ending in []
    • [Fix] fix for an impossible situation: when the formatter is called with a non-string value
    • [Fix] utils.merge: avoid a crash with a null target and an array source
    • [Refactor] utils: reduce observable [[Get]]s
    • [Refactor] use cached Array.isArray
    • [Refactor] stringify: Avoid arr = arr.concat(...), push to the existing instance (#269)
    • [Refactor] parse: only need to reassign the var once
    • [Robustness] stringify: avoid relying on a global undefined (#427)
    • [readme] remove travis badge; add github actions/codecov badges; update URLs
    • [Docs] Clean up license text so it’s properly detected as BSD-3-Clause
    • [Docs] Clarify the need for "arrayLimit" option
    • [meta] fix README.md (#399)
    • [meta] add FUNDING.yml
    • [actions] backport actions from main
    • [Tests] always use String(x) over x.toString()
    • [Tests] remove nonexistent tape option
    • [Dev Deps] backport from main
    Commits
    • 298bfa5 v6.5.3
    • ed0f5dc [Fix] parse: ignore __proto__ keys (#428)
    • 691e739 [Robustness] stringify: avoid relying on a global undefined (#427)
    • 1072d57 [readme] remove travis badge; add github actions/codecov badges; update URLs
    • 12ac1c4 [meta] fix README.md (#399)
    • 0338716 [actions] backport actions from main
    • 5639c20 Clean up license text so it’s properly detected as BSD-3-Clause
    • 51b8a0b add FUNDING.yml
    • 45f6759 [Fix] fix for an impossible situation: when the formatter is called with a no...
    • f814a7f [Dev Deps] backport from main
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump qs from 6.5.2 to 6.11.0 in /examples/quickstart

    Bump qs from 6.5.2 to 6.11.0 in /examples/quickstart

    Bumps qs from 6.5.2 to 6.11.0.

    Changelog

    Sourced from qs's changelog.

    6.11.0

    • [New] [Fix] stringify: revert 0e903c0; add commaRoundTrip option (#442)
    • [readme] fix version badge

    6.10.5

    • [Fix] stringify: with arrayFormat: comma, properly include an explicit [] on a single-item array (#434)

    6.10.4

    • [Fix] stringify: with arrayFormat: comma, include an explicit [] on a single-item array (#441)
    • [meta] use npmignore to autogenerate an npmignore file
    • [Dev Deps] update eslint, @ljharb/eslint-config, aud, has-symbol, object-inspect, tape

    6.10.3

    • [Fix] parse: ignore __proto__ keys (#428)
    • [Robustness] stringify: avoid relying on a global undefined (#427)
    • [actions] reuse common workflows
    • [Dev Deps] update eslint, @ljharb/eslint-config, object-inspect, tape

    6.10.2

    • [Fix] stringify: actually fix cyclic references (#426)
    • [Fix] stringify: avoid encoding arrayformat comma when encodeValuesOnly = true (#424)
    • [readme] remove travis badge; add github actions/codecov badges; update URLs
    • [Docs] add note and links for coercing primitive values (#408)
    • [actions] update codecov uploader
    • [actions] update workflows
    • [Tests] clean up stringify tests slightly
    • [Dev Deps] update eslint, @ljharb/eslint-config, aud, object-inspect, safe-publish-latest, tape

    6.10.1

    • [Fix] stringify: avoid exception on repeated object values (#402)

    6.10.0

    • [New] stringify: throw on cycles, instead of an infinite loop (#395, #394, #393)
    • [New] parse: add allowSparse option for collapsing arrays with missing indices (#312)
    • [meta] fix README.md (#399)
    • [meta] only run npm run dist in publish, not install
    • [Dev Deps] update eslint, @ljharb/eslint-config, aud, has-symbols, tape
    • [Tests] fix tests on node v0.6
    • [Tests] use ljharb/actions/node/install instead of ljharb/actions/node/run
    • [Tests] Revert "[meta] ignore eclint transitive audit warning"

    6.9.7

    • [Fix] parse: ignore __proto__ keys (#428)
    • [Fix] stringify: avoid encoding arrayformat comma when encodeValuesOnly = true (#424)
    • [Robustness] stringify: avoid relying on a global undefined (#427)
    • [readme] remove travis badge; add github actions/codecov badges; update URLs
    • [Docs] add note and links for coercing primitive values (#408)
    • [Tests] clean up stringify tests slightly
    • [meta] fix README.md (#399)
    • Revert "[meta] ignore eclint transitive audit warning"

    ... (truncated)

    Commits
    • 56763c1 v6.11.0
    • ddd3e29 [readme] fix version badge
    • c313472 [New] [Fix] stringify: revert 0e903c0; add commaRoundTrip option
    • 95bc018 v6.10.5
    • 0e903c0 [Fix] stringify: with arrayFormat: comma, properly include an explicit `[...
    • ba9703c v6.10.4
    • 4e44019 [Fix] stringify: with arrayFormat: comma, include an explicit [] on a s...
    • 113b990 [Dev Deps] update object-inspect
    • c77f38f [Dev Deps] update eslint, @ljharb/eslint-config, aud, has-symbol, tape
    • 2cf45b2 [meta] use npmignore to autogenerate an npmignore file
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump decode-uri-component from 0.2.0 to 0.2.2 in /website

    Bump decode-uri-component from 0.2.0 to 0.2.2 in /website

    Bumps decode-uri-component from 0.2.0 to 0.2.2.

    Release notes

    Sourced from decode-uri-component's releases.

    v0.2.2

    • Prevent overwriting previously decoded tokens 980e0bf

    https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.1...v0.2.2

    v0.2.1

    • Switch to GitHub workflows 76abc93
    • Fix issue where decode throws - fixes #6 746ca5d
    • Update license (#1) 486d7e2
    • Tidelift tasks a650457
    • Meta tweaks 66e1c28

    https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.0...v0.2.1

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
Releases(v0.5.1)
  • v0.5.1(Apr 19, 2017)

  • v0.5.0(Apr 18, 2017)

    • Default headers setup - doc
    • Multiline support for c-3po lib + setDedent setting - doc
    • Tutorial about development and production setup with c-3po and webpack
    • Removed nt from the core lib.
    • pkg.module support (details here)
    Source code(tar.gz)
    Source code(zip)
Owner
ttag
Simple approach for javascript localization based on GNU gettext utility
ttag
Give your JavaScript the ability to speak many languages.

Polyglot.js Polyglot.js is a tiny I18n helper library written in JavaScript, made to work both in the browser and in CommonJS environments (Node). It

Airbnb 3.6k Jan 2, 2023
human friendly i18n for javascript (node.js + browser)

BabelFish - human friendly i18n for JS Internationalisation with easy syntax for node.js and browser. Classic solutions use multiple phrases for plura

Nodeca 246 Nov 20, 2022
lightweight jQuery plugin for providing internationalization to javascript from ‘.properties’ files

jQuery.i18n.properties About jQuery.i18n.properties is a lightweight jQuery plugin for providing internationalization to javascript from ‘.properties’

null 408 Dec 25, 2022
A JavaScript Internationalization Framework

FBT is an internationalization framework for JavaScript designed to be not just powerful and flexible, but also simple and intuitive. It helps with th

Facebook 3.8k Jan 8, 2023
🌍📖 A readable, automated, and optimized (5 kb) internationalization for JavaScript

Linguijs ?? ?? A readable, automated, and optimized (5 kb) internationalization for JavaScript Documentation · Documentation 2.x · Quickstart · Exampl

Lingui 3.5k Jan 2, 2023
ICU MessageFormat for Javascript - i18n Plural and Gender Capable Messages

messageformat The experience and subtlety of your program's text can be important. Messageformat is a mechanism for handling both pluralization and ge

null 1.6k Dec 23, 2022
ICU MessageFormat for Javascript - i18n Plural and Gender Capable Messages

messageformat The experience and subtlety of your program's text can be important. Messageformat is a mechanism for handling both pluralization and ge

null 1.6k Dec 23, 2022
Gettext Style i18n for Modern JavaScript Apps

Jed Gettext Style i18n for Modern JavaScript Apps For more info

null 879 Dec 14, 2022
Javascript-testing-practical-approach-2021-course-v3 - Javascript Testing, a Practical Approach (v3)

Javascript Testing, a Practical Approach Description This is the reference repository with all the contents and the examples of the "Javascript Testin

Stefano Magni 2 Nov 14, 2022
Grupprojekt för kurserna 'Javascript med Ramverk' och 'Agil Utveckling'

JavaScript-med-Ramverk-Laboration-3 Grupprojektet för kurserna Javascript med Ramverk och Agil Utveckling. Utvecklingsguide För information om hur utv

Svante Jonsson IT-Högskolan 3 May 18, 2022
Hemsida för personer i Sverige som kan och vill erbjuda boende till människor på flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

null 4 May 3, 2022
Kurs-repo för kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

null 14 Jan 3, 2023
1kb js library contains development debugging, error monitoring and reporting, user problem localization features

1kb js library contains development debugging, error monitoring and reporting, user problem localization features

腾讯 AlloyTeam 1.4k Dec 22, 2022
Node JS/TypeScript module that allows you to work with the site enka.network adding localization and convenience.

enkaNetwork Node JS/TypeScript module that allows you to work with the site enka.network adding localization and convenience. examples • structure ??

kravets 12 Nov 18, 2022
Composable data visualisation library for web with a data-first approach now powered by WebAssembly

What is Muze? Muze is a free data visualization library for creating exploratory data visualizations (like Tableau) in browser, using WebAssembly. It

Charts.com 1.2k Dec 29, 2022
A caffeine driven, simplistic approach to benchmarking.

Matcha A caffeine driven, simple approach to benchmarking. Matcha allow you to design experiments that will measure the performance of your code. It i

Jake Luer 557 Nov 30, 2022
Open source rich text editor based on HTML5 and the progressive-enhancement approach. Uses a sophisticated security concept and aims to generate fully valid HTML5 markup by preventing unmaintainable tag soups and inline styles.

This project isn’t maintained anymore Please check out this fork. wysihtml5 0.3.0 wysihtml5 is an open source rich text editor based on HTML5 technolo

Christopher Blum 6.5k Jan 7, 2023
Plain functions for a more functional Deku approach to creating stateless React components, with functional goodies such as compose, memoize, etc... for free.

"Keo" is the Vietnamese translation for glue. Plain functions for a more functional Deku approach to creating stateless React components, with functio

Adam Timberlake 225 Sep 24, 2022