mirror of
https://github.com/gristlabs/grist-core.git
synced 2024-10-27 20:44:07 +00:00
Merge pull request #322 from incubateur-territoires/fix-i18n-exists
Fix condition to check that a translation key exists
This commit is contained in:
commit
4ebffff06d
@ -71,7 +71,7 @@ export async function setupLocale() {
|
|||||||
* Resolves the translation of the given key, using the given options.
|
* Resolves the translation of the given key, using the given options.
|
||||||
*/
|
*/
|
||||||
export function t(key: string, args?: any): string {
|
export function t(key: string, args?: any): string {
|
||||||
if (!i18next.exists(key)) {
|
if (!i18next.exists(key, args)) {
|
||||||
const error = new Error(`Missing translation for key: ${key} and language: ${i18next.language}`);
|
const error = new Error(`Missing translation for key: ${key} and language: ${i18next.language}`);
|
||||||
reportError(error);
|
reportError(error);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user