1953 - Automaton-friendly localization export
L10n repository tags are nice to avoid comitting translation work, but it becomes a problem to test a release *before* tagging it (so, before generating the zipfile), for example to check that there is no missing translation phrase. I tried to write a simple wget/append script to fetch l10n (see below), but it is not usable as such: what is appended is a complete HTML page, not just LUA code.
Please provide direct access to the export API (via GET rather than POST if possible) which would render a raw output.
fetch_translation.sh
#!/bin/sh
DOT_CONF="${HOME}/.fetch_translation"
if [ -e "$DOT_CONF" ]; then
. "$DOT_CONF"
fi
if [ "z$API_KEY" == z ]; then
echo "API_KEY is not set, cannot continue."
exit -1
fi
if [ $# -ne 1 ]; then
echo "Usage: $0 <addon name>"
exit -1
fi
ADDON="$1"
for LANGUAGE in enUS frFR deDE koKR esMX ruRU zhCN esES zhTW; do
FILENAME="${LANGUAGE}.lua"
if [ -e "$FILENAME" ]; then
echo "Updating ${FILENAME}..."
cp "$FILENAME" "${FILENAME}.org" || exit -1
svn revert "$FILENAME" || exit -1
wget -q -O - --post-data="language=${LANGUAGE}&format=lua_additive_table&handle_unlocalized=blank" "http://www.wowace.com/addons/${ADDON}/localization/export/?api-key=${API_KEY}" >> "$FILENAME" || exit -1
else
echo "Missing file ${FILENAME}, skipping"
fi
done
| User | When | Change |
|---|---|---|
| Subdino | Tue, 03 Nov 2009 02:31:23 | Changed component from None to Localization |
| Subdino | Sat, 31 Oct 2009 22:57:52 | Create |
Facts
- Last updated on
- 03 Nov 2009
- Reported on
- 31 Oct 2009
- Status
- New - Issue has not had initial review yet.
- Type
- Enhancement - A change which is intended to better the project in some way
- Priority
- Medium - Normal priority.
- Component
- Localization