![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
translation-adapter-ts
Advanced tools
The translation adapter for i18n_mrg tool support in TypeScript projects.
npm i translation-adapter-ts
import {PofileTransformer} from "translation-adapter-ts/src/PofileTransformer";
let transformer = new PofileTransformer();
transformer.transformDirectory('i18n/ru_RU/LC_MESSAGES');
transformer.transformDirectory('i18n/zh_CN/LC_MESSAGES');
import {Localizator} from "translation-adapter-ts/src/Localizator";
import {LanguageEnum} from "translation-adapter-ts/src/Enums/LanguageEnum";
import * as data from "translation-adapter-ts/test/translationFiles/test.json";
import {readFileSync} from "fs";
Localizator.addTranslation(LanguageEnum.RU, data);
Localizator.addTranslation(LanguageEnum.CN, readFileSync('/test/translationFiles/cn.json'));
Localizator.setDefaultLanguge(LanguageEnum.EN);
Localizator.setLanguage(LanguageEnum.RU);
If you use babel, with TS resolveJsonModule compiler directive, you may encounter an issue with data structure being exported as module with no default export. There's a workaround to fix that:
import * as data from "translation-adapter-ts/test/translationFiles/test.json";
//@ts-ignore
Localizator.addTranslation(LanguageEnum.RU, data.default);
import {__} from 'translation-adapter-ts/src/Main.ts';
console.log(__("Test string"));
console.log(__("Hello, %s", __("world")));
console.log(__("Hey %hello% %world%!"), {"%world%": __('world'), "hello": __("Hello")}); // In case if placeholder order may be different in different languages
import Localizator from 'translation-adapter-ts/build/Localizator';
Localizator.addTranslation('kr', {
"Hello": "여보세요"
});
Localizator.addTranslation('it', {
"Hello": "Ciao"
});
Localizator.addTranslation('cn', {
"Hello": "你好"
});
Localizator.setLanguage('cn');
export default function __ (args) {
return Localizator.localize(args);
}
console.log(__('Hello')); // 你好
FAQs
The translation adapter for i18n_mrg tool support in TypeScript projects.
The npm package translation-adapter-ts receives a total of 48 weekly downloads. As such, translation-adapter-ts popularity was classified as not popular.
We found that translation-adapter-ts demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.