diff --git a/reorderAll.sh b/reorderAll.sh new file mode 100755 index 00000000..3a1b2b95 --- /dev/null +++ b/reorderAll.sh @@ -0,0 +1,43 @@ +#!/bin/bash + +# this probably isn't safe. Don't do this without first running +# translation-progress.py to understand what data this may remove. + +TEMPLATE='reorderTemplate' + +reorder(){ + if [ -f "$1" ] ; then + echo "$1 already exists. Nothing done to it". + else + while read LINE ; do + OUTPUTLINE="" + if [ ! -z "$LINE" ]; then + OUTPUTLINE="$(grep "$LINE" "$1")" + fi + if [ -z "$OUTPUTLINE" ] ; then + if [ -z "$LINE" ] ; then + OUTPUTLINE="" + else + if [ -z "$(echo $LINE | grep "> "$1.out" + fi + done < $TEMPLATE + fi +} + +for FILE in app/src/main/res/values-* ; do + if [ -f "${FILE}/strings.xml" ] ; then + reorder "${FILE}/strings.xml" + fi +done diff --git a/reorderTemplate b/reorderTemplate new file mode 100644 index 00000000..ebae2f74 --- /dev/null +++ b/reorderTemplate @@ -0,0 +1,194 @@ +<\\!-- Do not change the order of any strings in here, without discussing first on the "Issues" page --> +<\\!-- Do not delete any blank lines --> + + + <\!-- Main activity titles --> + + + + + + + + + + <\!-- Forecast cards --> + + + + + <\!-- Main activity headings --> + + + + + + + + + <\!-- Settings/Units --> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <\!-- Settings/Appearance --> + + + + + + + + + + + + + + + + + <\!-- Settings/Data --> + + + + + + + + + + + + + + + + <\!-- Settings/Date format --> + + + + + + + + + + + + <\!-- Errors --> + + + + + + + <\!-- Wind direction --> + + + + + + + + + + + + + + + + + + <\!-- Wind strength - Beaufort --> + + + + + + + + + + + + + + + <\!-- Dash clock --> + <\!-- 1: temperature; 2: unit --> + + <\!-- 1: temperature; 2: unit; 3: weather description --> + + <\!-- 1: city; 2: country; 3: wind; 4: speed units; 5: pressure; 6: pressure units; 7: humidity --> + + + <\!-- Location --> + + + + + + + <\!-- Map --> + + + + + + <\!-- Graphs --> + + + <\!-- About dialogue --> + + + + + + + + <\!-- Widget --> + + + + +