зеркало из https://github.com/mozilla/kitsune.git
quieten gettext warnings, fix l10n for svelte
fix test_locales.sh script to test with pirate locale
This commit is contained in:
Родитель
0a7ef58935
Коммит
2e20094bd1
|
@ -23,9 +23,19 @@ echo "extract and merge...."
|
|||
echo "creating dir...."
|
||||
mkdir -p locale/xx/LC_MESSAGES
|
||||
|
||||
echo "copying messages.pot file...."
|
||||
cp locale/templates/LC_MESSAGES/messages.pot locale/xx/LC_MESSAGES/messages.po
|
||||
echo "copying pot files...."
|
||||
for potfile in $(find locale/templates/LC_MESSAGES/ -name "*.pot")
|
||||
do
|
||||
stem=$(basename $potfile .pot)
|
||||
cp $potfile locale/xx/LC_MESSAGES/${stem}.po
|
||||
done
|
||||
|
||||
echo "translate messages.po file...."
|
||||
./manage.py translate --pipeline=html,pirate locale/xx/LC_MESSAGES/messages.po
|
||||
locale/compile-mo.sh locale/xx/
|
||||
for pofile in $(find locale/xx/LC_MESSAGES/ -name "*.po")
|
||||
do
|
||||
dennis-cmd translate --pipeline=html,pirate $pofile
|
||||
|
||||
dir=$(dirname $pofile)
|
||||
stem=$(basename $pofile .po)
|
||||
msgfmt -o ${dir}/${stem}.mo $pofile
|
||||
done
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
import Header from "./Header";
|
||||
import Steps from "./Steps";
|
||||
import Picker from "./Picker";
|
||||
import { gettext } from "../utils";
|
||||
|
||||
export let area;
|
||||
export let images;
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
import { Router, Route } from "svelte-navigator";
|
||||
import Area from "./Area";
|
||||
import Landing from "./Landing";
|
||||
import { gettext } from "../utils";
|
||||
|
||||
// this is a little verbose, but dynamic imports aren't SSRed
|
||||
// if we do this in more places, we could write a webpack loader
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<script>
|
||||
import { Link } from "svelte-navigator";
|
||||
import { srcset } from "../utils";
|
||||
import { srcset, gettext } from "../utils";
|
||||
|
||||
export let area = "";
|
||||
export let images;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<script>
|
||||
import Header from "./Header";
|
||||
import Picker from "./Picker";
|
||||
import { srcset } from "../utils"
|
||||
import { srcset, gettext } from "../utils";
|
||||
|
||||
import imgAboutPng from "./img/About Us.png";
|
||||
import imgAboutWebp from "./img/About Us.webp";
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
<script>
|
||||
import Tile from "./Tile";
|
||||
import { gettext } from "../utils";
|
||||
|
||||
import forumImg from "./img/Support Forum.svg";
|
||||
import kbImg from "./img/Support Articles.svg";
|
||||
import l10nImg from "./img/Localization.svg";
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
<script>
|
||||
import { gettext } from "../utils";
|
||||
|
||||
export let steps = [];
|
||||
export let fact = {};
|
||||
</script>
|
||||
|
|
|
@ -9,3 +9,7 @@ export function srcset(...sources) {
|
|||
)
|
||||
.join(", ");
|
||||
}
|
||||
|
||||
export function gettext(...args) {
|
||||
return (typeof window === "undefined" ? global : window).gettext(...args);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче