Skip to content

Commit

Permalink
fix: tests
Browse files Browse the repository at this point in the history
  • Loading branch information
parasharrajat committed Jul 29, 2021
1 parent 72a3280 commit f9baac6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
8 changes: 2 additions & 6 deletions src/languages/es.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,12 +218,6 @@ export default {
desktop: {
label: 'Desktop',
},
window: {
label: 'Desktop',
},
Rajat: {
label: 'Desktop',
},
},
signOut: 'Desconectar',
versionLetter: 'v',
Expand Down Expand Up @@ -261,6 +255,7 @@ export default {
addFirstPaymentMethod: 'Añade un método de pago para enviar y recibir pagos directamente desde la aplicación',
},
preferencesPage: {
mostRecent: 'Más Recientes',
mostRecentModeDescription: 'Esta opción muestra por defecto todos los chats, ordenados a partir del más reciente, con los chats destacados arriba de todo',
focus: '#concentración',
focusModeDescription: '#concentración – Muestra sólo los chats no leídos y destacados ordenados alfabéticamente.',
Expand Down Expand Up @@ -302,6 +297,7 @@ export default {
twoFactorCode: 'Autenticación de 2 factores',
requiredWhen2FAEnabled: 'Obligatorio cuando A2F está habilitado',
error: {
incorrectLoginOrPassword: 'Usuario o clave incorrectos. Por favor inténtalo de nuevo',
twoFactorAuthenticationEnabled: 'Tienes autenticación de 2 factores activada en esta cuenta. Por favor conéctate usando su email o número de teléfono',
invalidLoginOrPassword: 'Usuario o clave incorrectos. Por favor inténtalo de nuevo o resetea tu clave',
unableToResetPassword: 'No pudimos cambiar tu clave. Probablemente porque el enlace para resetear la clave ha expirado. Te hemos enviado un nuevo enlace. Chequea tu bandeja de entrada y tu carpeta de Spam',
Expand Down
7 changes: 5 additions & 2 deletions tests/unit/TranslateTest.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const _ = require('underscore');
const {error: AnnotationError} = require('@actions/core');
const translate = require('../../src/libs/translate');
const CONFIG = require('../../src/CONFIG');
const translations = require('../../src/languages/translations');
Expand Down Expand Up @@ -80,16 +81,18 @@ describe('Translation Keys', () => {
const hasAllKeys = _.difference(mainLanguageKeys, languageKeys);
if (hasAllKeys.length) {
console.debug(`🏹 [ ${hasAllKeys.join(', ')} ] are missing from ${ln}.js`);
AnnotationError(`🏹 [ ${hasAllKeys.join(', ')} ] are missing from ${ln}.js`);
}
expect(hasAllKeys.length).toBe(0);
expect(hasAllKeys).toEqual([]);
});

it(`Does ${ln} locale has unused keys`, () => {
const hasAllKeys = _.difference(languageKeys, mainLanguageKeys);
if (hasAllKeys.length) {
console.debug(`🏹 [ ${hasAllKeys.join(', ')} ] are unused keys in ${ln}.js`);
AnnotationError(`🏹 [ ${hasAllKeys.join(', ')} ] are unused keys in ${ln}.js`);
}
expect(hasAllKeys.length).toBe(0);
expect(hasAllKeys).toEqual([]);
});
});
});

0 comments on commit f9baac6

Please sign in to comment.