Commit 3e8b3f73 authored by JC Brand's avatar JC Brand

Move pot and po files to src/i18n and regenerate

parent f51d281d
...@@ -68,18 +68,18 @@ serve_bg: node_modules ...@@ -68,18 +68,18 @@ serve_bg: node_modules
dist/converse-no-dependencies.js: src webpack.common.js webpack.nodeps.js @converse/headless node_modules dist/converse-no-dependencies.js: src webpack.common.js webpack.nodeps.js @converse/headless node_modules
npm run nodeps npm run nodeps
GETTEXT = $(XGETTEXT) --from-code=UTF-8 --language=JavaScript --keyword=__ --keyword=___ --keyword=i18n_ --force-po --output=locale/converse.pot --package-name=Converse.js --copyright-holder="Jan-Carel Brand" --package-version=6.0.0 dist/converse-no-dependencies.js -c GETTEXT = $(XGETTEXT) --from-code=UTF-8 --language=JavaScript --keyword=__ --keyword=___ --keyword=i18n_ --force-po --output=src/i18n/converse.pot --package-name=Converse.js --copyright-holder="Jan-Carel Brand" --package-version=6.0.0 dist/converse-no-dependencies.js -c
locale/converse.pot: dist/converse-no-dependencies.js src/i18n/converse.pot: dist/converse-no-dependencies.js
$(GETTEXT) 2>&1 > /dev/null; exit $$?; $(GETTEXT) 2>&1 > /dev/null; exit $$?;
rm dist/converse-no-dependencies.js rm dist/converse-no-dependencies.js
.PHONY: pot .PHONY: pot
pot: locale/converse.pot pot: src/i18n/converse.pot
.PHONY: po .PHONY: po
po: po:
find ./locale -maxdepth 1 -mindepth 1 -type d -exec msgmerge {}/LC_MESSAGES/converse.po ./locale/converse.pot -U \; find ./src/i18n -maxdepth 1 -mindepth 1 -type d -exec msgmerge {}/LC_MESSAGES/converse.po ./src/i18n/converse.pot -U \;
######################################################################## ########################################################################
## Release management ## Release management
...@@ -88,7 +88,7 @@ po: ...@@ -88,7 +88,7 @@ po:
release: release:
$(SED) -i '/^_converse.VERSION_NAME =/s/=.*/= "v$(VERSION)";/' src/headless/converse-core.js $(SED) -i '/^_converse.VERSION_NAME =/s/=.*/= "v$(VERSION)";/' src/headless/converse-core.js
$(SED) -i '/Version:/s/:.*/: $(VERSION)/' COPYRIGHT $(SED) -i '/Version:/s/:.*/: $(VERSION)/' COPYRIGHT
$(SED) -i '/Project-Id-Version:/s/:.*/: Converse.js $(VERSION)\n"/' locale/converse.pot $(SED) -i '/Project-Id-Version:/s/:.*/: Converse.js $(VERSION)\n"/' src/i18n/converse.pot
$(SED) -i '/"version":/s/:.*/: "$(VERSION)",/' manifest.json $(SED) -i '/"version":/s/:.*/: "$(VERSION)",/' manifest.json
$(SED) -i '/"version":/s/:.*/: "$(VERSION)",/' package.json $(SED) -i '/"version":/s/:.*/: "$(VERSION)",/' package.json
$(SED) -i '/"version":/s/:.*/: "$(VERSION)",/' src/headless/package.json $(SED) -i '/"version":/s/:.*/: "$(VERSION)",/' src/headless/package.json
......
...@@ -97,7 +97,7 @@ export const i18n = { ...@@ -97,7 +97,7 @@ export const i18n = {
if (!isConverseLocale(locale, _converse.api.settings.get("locales")) || locale === 'en') { if (!isConverseLocale(locale, _converse.api.settings.get("locales")) || locale === 'en') {
return; return;
} }
const { default: data } = await import(/*webpackChunkName: "locales/[request]" */ `../../locale/${locale}/LC_MESSAGES/converse.po`); const { default: data } = await import(/*webpackChunkName: "locales/[request]" */ `../i18n/${locale}/LC_MESSAGES/converse.po`);
await import(/*webpackChunkName: "locales/dayjs/[request]" */ `dayjs/locale/${locale.toLowerCase().replace('_', '-')}`); await import(/*webpackChunkName: "locales/dayjs/[request]" */ `dayjs/locale/${locale.toLowerCase().replace('_', '-')}`);
dayjs.locale(getLocale(_converse.locale, l => dayjs.locale(l))); dayjs.locale(getLocale(_converse.locale, l => dayjs.locale(l)));
jed_instance = new Jed(data); jed_instance = new Jed(data);
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
/* global module, __dirname */ /* global module, __dirname */
const MiniCssExtractPlugin = require('mini-css-extract-plugin'); const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const common = require("./webpack.common.js"); const common = require("./webpack.common.js");
const merge = require("webpack-merge");
const path = require('path'); const path = require('path');
const { merge} = require("webpack-merge");
module.exports = merge(common, { module.exports = merge(common, {
mode: "production", mode: "production",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment