Merge branch 'asonix/changes' into asonix/downstream
This commit is contained in:
commit
700b08a00c
|
@ -2,114 +2,9 @@
|
||||||
/*eslint no-nested-ternary: "off"*/
|
/*eslint no-nested-ternary: "off"*/
|
||||||
/*eslint quotes: "off"*/
|
/*eslint quotes: "off"*/
|
||||||
|
|
||||||
|
import en from "react-intl/locale-data/en.js";
|
||||||
|
|
||||||
export default [
|
export default [
|
||||||
{
|
...en,
|
||||||
locale: "en-DOG",
|
{ locale: "en-DOG", parentLocale: "en" }
|
||||||
pluralRuleFunction: function(e, a) {
|
|
||||||
var n = String(e).split("."),
|
|
||||||
l = !n[1],
|
|
||||||
o = Number(n[0]) == e,
|
|
||||||
t = o && n[0].slice(-1),
|
|
||||||
r = o && n[0].slice(-2);
|
|
||||||
return a ? 1 == t && 11 != r ? "one" : 2 == t && 12 != r ? "two" : 3 == t && 13 != r ? "few" : "other" : 1 == e && l ? "one" : "other"
|
|
||||||
},
|
|
||||||
fields: {
|
|
||||||
year: {
|
|
||||||
displayName: "year",
|
|
||||||
relative: {
|
|
||||||
0: "this year",
|
|
||||||
1: "next year",
|
|
||||||
"-1": "last year"
|
|
||||||
},
|
|
||||||
relativeTime: {
|
|
||||||
future: {
|
|
||||||
one: "in {0} year",
|
|
||||||
other: "in {0} years"
|
|
||||||
},
|
|
||||||
past: {
|
|
||||||
one: "{0} year ago",
|
|
||||||
other: "{0} years ago"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
month: {
|
|
||||||
displayName: "month",
|
|
||||||
relative: {
|
|
||||||
0: "this month",
|
|
||||||
1: "next month",
|
|
||||||
"-1": "last month"
|
|
||||||
},
|
|
||||||
relativeTime: {
|
|
||||||
future: {
|
|
||||||
one: "in {0} month",
|
|
||||||
other: "in {0} months"
|
|
||||||
},
|
|
||||||
past: {
|
|
||||||
one: "{0} month ago",
|
|
||||||
other: "{0} months ago"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
day: {
|
|
||||||
displayName: "day",
|
|
||||||
relative: {
|
|
||||||
0: "today",
|
|
||||||
1: "tomorrow",
|
|
||||||
"-1": "yesterday"
|
|
||||||
},
|
|
||||||
relativeTime: {
|
|
||||||
future: {
|
|
||||||
one: "in {0} day",
|
|
||||||
other: "in {0} days"
|
|
||||||
},
|
|
||||||
past: {
|
|
||||||
one: "{0} day ago",
|
|
||||||
other: "{0} days ago"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
hour: {
|
|
||||||
displayName: "hour",
|
|
||||||
relativeTime: {
|
|
||||||
future: {
|
|
||||||
one: "in {0} hour",
|
|
||||||
other: "in {0} hours"
|
|
||||||
},
|
|
||||||
past: {
|
|
||||||
one: "{0} hour ago",
|
|
||||||
other: "{0} hours ago"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
minute: {
|
|
||||||
displayName: "minute",
|
|
||||||
relativeTime: {
|
|
||||||
future: {
|
|
||||||
one: "in {0} minute",
|
|
||||||
other: "in {0} minutes"
|
|
||||||
},
|
|
||||||
past: {
|
|
||||||
one: "{0} minute ago",
|
|
||||||
other: "{0} minutes ago"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
second: {
|
|
||||||
displayName: "second",
|
|
||||||
relative: {
|
|
||||||
0: "now"
|
|
||||||
},
|
|
||||||
relativeTime: {
|
|
||||||
future: {
|
|
||||||
one: "in {0} second",
|
|
||||||
other: "in {0} seconds"
|
|
||||||
},
|
|
||||||
past: {
|
|
||||||
one: "{0} second ago",
|
|
||||||
other: "{0} seconds ago"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
];
|
];
|
||||||
|
|
|
@ -2,114 +2,9 @@
|
||||||
/*eslint no-nested-ternary: "off"*/
|
/*eslint no-nested-ternary: "off"*/
|
||||||
/*eslint quotes: "off"*/
|
/*eslint quotes: "off"*/
|
||||||
|
|
||||||
|
import en from "react-intl/locale-data/en.js";
|
||||||
|
|
||||||
export default [
|
export default [
|
||||||
{
|
...en,
|
||||||
locale: "en-LEO",
|
{ locale: "en-LEO", parentLocale: "en" }
|
||||||
pluralRuleFunction: function(e, a) {
|
|
||||||
var n = String(e).split("."),
|
|
||||||
l = !n[1],
|
|
||||||
o = Number(n[0]) == e,
|
|
||||||
t = o && n[0].slice(-1),
|
|
||||||
r = o && n[0].slice(-2);
|
|
||||||
return a ? 1 == t && 11 != r ? "one" : 2 == t && 12 != r ? "two" : 3 == t && 13 != r ? "few" : "other" : 1 == e && l ? "one" : "other"
|
|
||||||
},
|
|
||||||
fields: {
|
|
||||||
year: {
|
|
||||||
displayName: "year",
|
|
||||||
relative: {
|
|
||||||
0: "this year",
|
|
||||||
1: "next year",
|
|
||||||
"-1": "last year"
|
|
||||||
},
|
|
||||||
relativeTime: {
|
|
||||||
future: {
|
|
||||||
one: "in {0} year",
|
|
||||||
other: "in {0} years"
|
|
||||||
},
|
|
||||||
past: {
|
|
||||||
one: "{0} year ago",
|
|
||||||
other: "{0} years ago"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
month: {
|
|
||||||
displayName: "month",
|
|
||||||
relative: {
|
|
||||||
0: "this month",
|
|
||||||
1: "next month",
|
|
||||||
"-1": "last month"
|
|
||||||
},
|
|
||||||
relativeTime: {
|
|
||||||
future: {
|
|
||||||
one: "in {0} month",
|
|
||||||
other: "in {0} months"
|
|
||||||
},
|
|
||||||
past: {
|
|
||||||
one: "{0} month ago",
|
|
||||||
other: "{0} months ago"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
day: {
|
|
||||||
displayName: "day",
|
|
||||||
relative: {
|
|
||||||
0: "today",
|
|
||||||
1: "tomorrow",
|
|
||||||
"-1": "yesterday"
|
|
||||||
},
|
|
||||||
relativeTime: {
|
|
||||||
future: {
|
|
||||||
one: "in {0} day",
|
|
||||||
other: "in {0} days"
|
|
||||||
},
|
|
||||||
past: {
|
|
||||||
one: "{0} day ago",
|
|
||||||
other: "{0} days ago"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
hour: {
|
|
||||||
displayName: "hour",
|
|
||||||
relativeTime: {
|
|
||||||
future: {
|
|
||||||
one: "in {0} hour",
|
|
||||||
other: "in {0} hours"
|
|
||||||
},
|
|
||||||
past: {
|
|
||||||
one: "{0} hour ago",
|
|
||||||
other: "{0} hours ago"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
minute: {
|
|
||||||
displayName: "minute",
|
|
||||||
relativeTime: {
|
|
||||||
future: {
|
|
||||||
one: "in {0} minute",
|
|
||||||
other: "in {0} minutes"
|
|
||||||
},
|
|
||||||
past: {
|
|
||||||
one: "{0} minute ago",
|
|
||||||
other: "{0} minutes ago"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
second: {
|
|
||||||
displayName: "second",
|
|
||||||
relative: {
|
|
||||||
0: "now"
|
|
||||||
},
|
|
||||||
relativeTime: {
|
|
||||||
future: {
|
|
||||||
one: "in {0} second",
|
|
||||||
other: "in {0} seconds"
|
|
||||||
},
|
|
||||||
past: {
|
|
||||||
one: "{0} second ago",
|
|
||||||
other: "{0} seconds ago"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
];
|
];
|
||||||
|
|
|
@ -2,114 +2,9 @@
|
||||||
/*eslint no-nested-ternary: "off"*/
|
/*eslint no-nested-ternary: "off"*/
|
||||||
/*eslint quotes: "off"*/
|
/*eslint quotes: "off"*/
|
||||||
|
|
||||||
|
import en from "react-intl/locale-data/en.js";
|
||||||
|
|
||||||
export default [
|
export default [
|
||||||
{
|
...en,
|
||||||
locale: "en-SQK",
|
{ locale: "en-SQK", parentLocale: "en" }
|
||||||
pluralRuleFunction: function(e, a) {
|
|
||||||
var n = String(e).split("."),
|
|
||||||
l = !n[1],
|
|
||||||
o = Number(n[0]) == e,
|
|
||||||
t = o && n[0].slice(-1),
|
|
||||||
r = o && n[0].slice(-2);
|
|
||||||
return a ? 1 == t && 11 != r ? "one" : 2 == t && 12 != r ? "two" : 3 == t && 13 != r ? "few" : "other" : 1 == e && l ? "one" : "other"
|
|
||||||
},
|
|
||||||
fields: {
|
|
||||||
year: {
|
|
||||||
displayName: "year",
|
|
||||||
relative: {
|
|
||||||
0: "this year",
|
|
||||||
1: "next year",
|
|
||||||
"-1": "last year"
|
|
||||||
},
|
|
||||||
relativeTime: {
|
|
||||||
future: {
|
|
||||||
one: "in {0} year",
|
|
||||||
other: "in {0} years"
|
|
||||||
},
|
|
||||||
past: {
|
|
||||||
one: "{0} year ago",
|
|
||||||
other: "{0} years ago"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
month: {
|
|
||||||
displayName: "month",
|
|
||||||
relative: {
|
|
||||||
0: "this month",
|
|
||||||
1: "next month",
|
|
||||||
"-1": "last month"
|
|
||||||
},
|
|
||||||
relativeTime: {
|
|
||||||
future: {
|
|
||||||
one: "in {0} month",
|
|
||||||
other: "in {0} months"
|
|
||||||
},
|
|
||||||
past: {
|
|
||||||
one: "{0} month ago",
|
|
||||||
other: "{0} months ago"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
day: {
|
|
||||||
displayName: "day",
|
|
||||||
relative: {
|
|
||||||
0: "today",
|
|
||||||
1: "tomorrow",
|
|
||||||
"-1": "yesterday"
|
|
||||||
},
|
|
||||||
relativeTime: {
|
|
||||||
future: {
|
|
||||||
one: "in {0} day",
|
|
||||||
other: "in {0} days"
|
|
||||||
},
|
|
||||||
past: {
|
|
||||||
one: "{0} day ago",
|
|
||||||
other: "{0} days ago"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
hour: {
|
|
||||||
displayName: "hour",
|
|
||||||
relativeTime: {
|
|
||||||
future: {
|
|
||||||
one: "in {0} hour",
|
|
||||||
other: "in {0} hours"
|
|
||||||
},
|
|
||||||
past: {
|
|
||||||
one: "{0} hour ago",
|
|
||||||
other: "{0} hours ago"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
minute: {
|
|
||||||
displayName: "minute",
|
|
||||||
relativeTime: {
|
|
||||||
future: {
|
|
||||||
one: "in {0} minute",
|
|
||||||
other: "in {0} minutes"
|
|
||||||
},
|
|
||||||
past: {
|
|
||||||
one: "{0} minute ago",
|
|
||||||
other: "{0} minutes ago"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
second: {
|
|
||||||
displayName: "second",
|
|
||||||
relative: {
|
|
||||||
0: "now"
|
|
||||||
},
|
|
||||||
relativeTime: {
|
|
||||||
future: {
|
|
||||||
one: "in {0} second",
|
|
||||||
other: "in {0} seconds"
|
|
||||||
},
|
|
||||||
past: {
|
|
||||||
one: "{0} second ago",
|
|
||||||
other: "{0} seconds ago"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
];
|
];
|
||||||
|
|
|
@ -1307,6 +1307,7 @@
|
||||||
line-height: 22px;
|
line-height: 22px;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
.display-name {
|
.display-name {
|
||||||
bdi {
|
bdi {
|
||||||
|
|
|
@ -25,7 +25,9 @@ locales.forEach(locale => {
|
||||||
const localePath = path.join(outPath, `locale_${locale}.js`);
|
const localePath = path.join(outPath, `locale_${locale}.js`);
|
||||||
const baseLocale = locale.split('-')[0]; // e.g. 'zh-TW' -> 'zh'
|
const baseLocale = locale.split('-')[0]; // e.g. 'zh-TW' -> 'zh'
|
||||||
const localeDataPath = [
|
const localeDataPath = [
|
||||||
// first try react-intl
|
// first try full locale in locales/locale-data
|
||||||
|
`../../app/javascript/mastodon/locales/locale-data/${locale}.js`,
|
||||||
|
// then try react-intl
|
||||||
`../../node_modules/react-intl/locale-data/${baseLocale}.js`,
|
`../../node_modules/react-intl/locale-data/${baseLocale}.js`,
|
||||||
// then check locales/locale-data
|
// then check locales/locale-data
|
||||||
`../../app/javascript/mastodon/locales/locale-data/${baseLocale}.js`,
|
`../../app/javascript/mastodon/locales/locale-data/${baseLocale}.js`,
|
||||||
|
|
Loading…
Reference in a new issue