diff --git a/.travis.yml b/.travis.yml index 4608ce6d..7373e8c1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,6 +16,7 @@ install: script: - "if [[ $TRAVIS_EVENT_TYPE != 'cron' && $TRAVIS_EVENT_TYPE != 'api' ]]; then luacheck .; fi" before_deploy: + - ./.travis/check_locale.sh - git config --local user.name "$github_user_name" - git config --local user.email "$github_user_email" - DATE_FORMATTED=$(date +'%Y-%m-%d') diff --git a/.travis/check_locale.sh b/.travis/check_locale.sh new file mode 100755 index 00000000..2b520d5d --- /dev/null +++ b/.travis/check_locale.sh @@ -0,0 +1,40 @@ +#!/bin/sh + +cd ~/build/Refactorio/RedMew/locale/ || exit +echo "Changing working directory to: " +pwd + +ldiff() { + + while read file; do + + cat en/$file | sed 's/=.*//' | sed '/^#/ d' >diff_file.tmp + count=$(cat "$1/$file" | sed 's/=.*//' | sed '/^#/ d' | git --no-pager diff --no-index -- diff_file.tmp - | tail -n +6 | grep -o '\-.*' | sed '/^-$/d' | wc -l) + if [ "$count" -ne 0 ]; then + echo + echo "locale/$1/$file: ($count differences)" + echo "------------------------------" + + cat "$1/$file" | sed 's/=.*//' | sed '/^#/ d' | git --no-pager diff --no-index -- diff_file.tmp - | tail -n +6 | grep -o '\-.*' | sed '/^-$/d' | sed 's/^-//' + + echo "------------------------------" + rm diff_file.tmp + fi + done +} + +echo "##############################" +echo" Checking locale for misplaced/missing keys." +for dir in *; do + if [ "$dir" != "en" ]; then + ls en | ldiff $dir + fi +done + +echo +echo "Done checking locale" +echo "##############################" + +cd ../../../ +echo "Changing working directory back to: " +pwd diff --git a/locale/de/redmew_command_text.cfg b/locale/de/redmew_command_text.cfg index 0352951b..bd945f9f 100644 --- a/locale/de/redmew_command_text.cfg +++ b/locale/de/redmew_command_text.cfg @@ -1,7 +1,5 @@ # This file holds all the locale strings for command help and descriptions [command_description] -tp=If blank, teleport to selected entity. mode = toggle tp mode where you can teleport to a placed ghost. player = teleport to player. [command_custom_help] -tp= 3 different uses: "/tp" to tp to selected entity. "/tp mode" to toggle tp mode. "/tp Newcott" to tp to Newcott. diff --git a/locale/de/redmew_utils.cfg b/locale/de/redmew_utils.cfg index cb924c10..a81e74d7 100644 --- a/locale/de/redmew_utils.cfg +++ b/locale/de/redmew_utils.cfg @@ -1,25 +1,8 @@ [command] help_text_format=__1__ __2__ __3__ -log_entry=__1__(Map time: __2__) [__3__ Command] __4__, used: __5__ __6__ required_rank= (Rang __1__ oder höher benötigt.) -donator_only=(Donator only) -server_only=(Server only) -undocumented_command=[Undocumented command] - -not_allowed_by_server=The command '__1__' is not allowed to be executed by the server. -not_allowed_by_players=The command '__1__' is not allowed to be executed by players. higher_rank_needed=Du brauchst Rang __2__ oder höher um den Befehl __1__ auszuführen. -not_allowed_by_non_donators=The command '__1__' is only allowed for donators. - -fail_missing_argument=Argument "__1__" from command __2__ is missing. -warn_player_of_error=There was an error running __1__, it has been logged. -failed_command=Sorry there was an error running __1__ -warn_deprecated_command=Warning! Usage of the command "/__1__" is deprecated. Please use "/__2__" instead. -error_bad_option=The following options were given to the command '__1__' but are invalid: __2__ -error_no_player_no_server=The command '__1__' is not allowed by the server nor player, please enable at least one of them. -error_while_running_debug=__1__ triggered an error running a command and has been logged: '__2__' with arguments __3__ -error_log=Error while running '__1__' with arguments __2__: __3__ [utils_core] print_admins=__1__(ADMIN) __2__: __3__