Skip to content

Commit 3d3ea80

Browse files
committed
Remaining ttag references
1 parent 1974815 commit 3d3ea80

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

.babelrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
},
1717
"extract": {
1818
"plugins": [
19-
["c-3po", {
19+
["ttag", {
2020
"extract": {
2121
"output": "locales/metabase-frontend.pot"
2222
},

bin/i18n/build-translation-frontend-resource

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const fs = require("fs");
77
const _ = require("underscore");
88
const gParser = require("gettext-parser");
99

10-
// NOTE: this function replace xgettext "{0}" style references with c-3po "${ 0 }" style references
10+
// NOTE: this function replace xgettext "{0}" style references with ttag "${ 0 }" style references
1111
function replaceReferences(str) {
1212
return str.replace(/\{ *(\d+) *\}/g, "${ $1 }");
1313
}

bin/i18n/update-translation-template

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ mkdir -p "locales"
3030
BABEL_ENV=extract ./node_modules/.bin/babel -q -x .js,.jsx -o /dev/null frontend/src
3131
# BABEL_ENV=extract BABEL_DISABLE_CACHE=1 yarn run build
3232

33-
# NOTE: replace c-3po's "${ 0 }" style references with xgettext "{0}" style references for consistency
33+
# NOTE: replace ttag's "${ 0 }" style references with xgettext "{0}" style references for consistency
3434
sed -i".bak" -E 's/\$\{ *([0-9]+) *\}/{\1}/g' "$POT_FRONTEND_NAME"
3535
rm "$POT_FRONTEND_NAME.bak"
3636

docs/developers-guide.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ We are an application with lots of users all over the world. To help them use Me
307307

308308
If you need to add new strings (try to be judicious about adding copy) do the following:
309309

310-
1. Tag strings in the frontend using `t` and `jt` ES6 template literals (see more details in https://c-3po.js.org/):
310+
1. Tag strings in the frontend using `t` and `jt` ES6 template literals (see more details in https://ttag.js.org/):
311311

312312
```javascript
313313
const someString = t`Hello ${name}!`;

frontend/src/metabase/lib/i18n-debug.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const obfuscateString = (original, string) => {
3535
};
3636

3737
export function enableTranslatedStringReplacement() {
38-
const c3po = require("c-3po");
38+
const c3po = require("ttag");
3939
const _t = c3po.t;
4040
const _jt = c3po.jt;
4141
const _ngettext = c3po.ngettext;

frontend/src/metabase/lib/i18n.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export function setLocalization(translationsObject) {
2626
}
2727

2828
// we delete msgid property since it's redundant, but have to add it back in to
29-
// make c-3po happy
29+
// make ttag happy
3030
function addMsgIds(translationsObject) {
3131
const msgs = translationsObject.translations[""];
3232
for (const msgid in msgs) {

0 commit comments

Comments
 (0)