Skip to content

Commit

Permalink
small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
sgiehl committed Oct 10, 2013
1 parent 1cd0f1a commit a4972f3
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions misc/translationTool.sh
Expand Up @@ -290,8 +290,7 @@ function setTranslationsForLanguage() {
require_once PIWIK_INCLUDE_PATH . "/libs/upgradephp/upgrade.php";
require_once PIWIK_INCLUDE_PATH . "/core/Loader.php";
require_once PIWIK_INCLUDE_PATH . "/core/functions.php";
include_once PIWIK_INCLUDE_PATH . "/vendor/autoload.php";
require_once PIWIK_INCLUDE_PATH . "/vendor/autoload.php";
use Piwik\Translate\Writer;
use Piwik\Translate\Validate\NoScripts;
Expand Down Expand Up @@ -347,12 +346,14 @@ function updateLanguageFiles() {

pluginsWithTranslations=(`showPluginsWithTranslations`);

if [ "$#" -eq 2 ]; then
pluginName=${2};
if [ "$#" -eq 1 ]; then
pluginName=${1};

if [[ ! ${pluginsWithTranslations[@]} =~ ${pluginName} ]]; then
echo "${pluginName} does not exist or has no own language files"; exit;
fi;

echo "Starting to update language files for plugin ${pluginName}"
fi

mergeBranchWithMaster;
Expand Down Expand Up @@ -407,7 +408,7 @@ case ${COMMAND} in
languagecodes) showAvailableLanguageCodes;;
pt) showPluginsWithTranslations;;
plugintranslations) showPluginsWithTranslations;;
up) updateLanguageFiles;;
up) updateLanguageFiles ${2};;
fetch) fetchTranslationsFromOTrance;;
*) showHelp
esac

0 comments on commit a4972f3

Please sign in to comment.