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
- 1 comment
- 1 comment
Facts
- Last updated on
- 09 Nov 2011
- Reported on
- 31 Oct 2009
- Status
- Declined - We decided not to take action on this ticket.
- Type
- Enhancement - A change which is intended to better the project in some way
- Priority
- Medium - Normal priority.
- Reply
- #1
Torhal Wed, 09 Nov 2011 16:29:19You can either test using alpha files (not tagged), or simply change your development paradigm: Don't develop against non-live AddOns.