Skip to content

Disable locales that have a completion rate below 40% #13482

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 0 additions & 17 deletions config/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,14 +180,8 @@ module.exports = {

// Supported languages.
langs: [
'af',
'ar',
'ast',
'az',
'bg',
'bn',
'bs',
'ca',
'cak',
'cs',
'da',
Expand All @@ -201,14 +195,10 @@ module.exports = {
'es-CL',
'es-ES',
'es-MX',
'et',
'eu',
'fa',
'fi',
'fr',
'fur',
'fy-NL',
'ga-IE',
'he',
'hr',
'hsb',
Expand All @@ -221,12 +211,7 @@ module.exports = {
'ka',
'kab',
'ko',
'lt',
'lv',
'mk',
'mn',
'ms',
'mt',
'nb-NO',
'nl',
'nn-NO',
Expand All @@ -236,7 +221,6 @@ module.exports = {
'pt-PT',
'ro',
'ru',
'si',
'sk',
'sl',
'sq',
Expand All @@ -245,7 +229,6 @@ module.exports = {
'th',
'tr',
'uk',
'ur',
'vi',
'zh-CN',
'zh-TW',
Expand Down
6 changes: 3 additions & 3 deletions tests/unit/amo/components/TestAddonTitle.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ describe(__filename, () => {

it('handles RTL mode', () => {
// `fa` is a RTL language.
dispatchClientMetadata({ lang: 'fa', store });
dispatchClientMetadata({ lang: 'ar', store });

const author1 = {
...fakeAddon.authors[0],
Expand All @@ -149,9 +149,9 @@ describe(__filename, () => {

expect(screen.getAllByRole('link')).toHaveLength(2);
const link1 = screen.getByRole('link', { name: author1.name });
expect(link1).toHaveAttribute('href', `/fa/android/user/${author1.id}/`);
expect(link1).toHaveAttribute('href', `/ar/android/user/${author1.id}/`);
const link2 = screen.getByRole('link', { name: author2.name });
expect(link2).toHaveAttribute('href', `/fa/android/user/${author2.id}/`);
expect(link2).toHaveAttribute('href', `/ar/android/user/${author2.id}/`);

expect(screen.getByClassName('AddonTitle-author')).toHaveTextContent(
`${author1.name} ,${author2.name} by`,
Expand Down
6 changes: 4 additions & 2 deletions tests/unit/test_localesConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import config from 'config';
import { globSync } from 'glob';

import { langToLocale, localeToLang } from 'amo/i18n/utils';
import { unfilteredLanguages } from 'amo/languages';

const langs = config.get('langs');
const basePath = config.get('basePath');
Expand All @@ -18,6 +19,7 @@ describe(__filename, () => {
it.each(langs)('should have a corresponding %s dir in locale', (lang) => {
fs.lstatSync(path.join(basePath, 'locale', langToLocale(lang)));
});
const allKnownLanguages = Object.keys(unfilteredLanguages);

for (const localeDir of globSync('locale/*')) {
const locale = path.basename(localeDir);
Expand All @@ -26,8 +28,8 @@ describe(__filename, () => {
continue;
}
// eslint-disable no-loop-func
it(`should have a "${lang}" entry for locale dir in config.langs`, () =>
expect(langs).toContain(lang));
it(`should have a "${lang}" entry in unfilteredLanguages because locale dir exists`, () =>
expect(allKnownLanguages).toContain(lang));
}

describe('Check Locale JS files', () => {
Expand Down