INNER CODE UNIT · JavaScript

Promise

GDevelopApp/GDevelop-extensions · scripts/compile-translations.js:153

        return new Promise((resolve) => {
          console.info(`ℹ️ Compiling translations for ${locale}`);
          // Concatenate all message catalogs into a single one for lingui-js.
          const files = getLocaleSourceCatalogFiles(locale);
          console.info(`ℹ️ Concatenating ${files.join(', ')} for ${locale}`);

          if (locale === 'en' || locale === 'pseudo_LOCALE') {
            // For languages with a single source ("en" and "pseudo_LOCALE"),
            // don't concatenate anything, create the 'messages.po' file.
            const cpResult = shell.cp(
              path.join(getLocalePath(locale), files[0]),
              path.join(getLocalePath(locale), 'messages.po')
            );

            return resolve({
              locale,
              shellOutput: {
                code: cpResult.code,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…