-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix some installer issues, remove some noise
- Loading branch information
Showing
6 changed files
with
107 additions
and
66 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,43 @@ | ||
#!/bin/sh | ||
|
||
if [ -z "$1" ] | ||
then | ||
# Default to German if no language is supplied | ||
if [ -z "$1" ]; then | ||
echo "No language supplied, defaulting to German (de)" | ||
language="de" | ||
else | ||
else | ||
language="$1" | ||
fi | ||
|
||
# Determine the Drupal version | ||
drupal_version=$(drush status drupal-version --format=string) | ||
if [ -z "$drupal_version" ]; then | ||
echo "Error: Unable to determine Drupal version." | ||
exit 1 | ||
fi | ||
|
||
printf "\e[36mImporting translation for $language...\e[0m\n" | ||
drush language-add $language | ||
|
||
# Download .po file | ||
printf "\e[36mDownloading .po file...\e[0m\n" | ||
wget "https://ftp.drupal.org/files/translations/10.x/drupal/drupal-$language.po" -P ../translations | ||
|
||
# Import .po file | ||
drush locale:import $language ../translations/drupal-$language.po | ||
# Check if the .po file was downloaded successfully | ||
if [ -f "$translations_dir/drupal-$drupal_version.$language.po" ]; then | ||
|
||
# Set the working directory to the script's parent directory | ||
cd "$(dirname "$0")/.." | ||
# Set the working directory to the script's parent directory | ||
cd "$(dirname "$0")/.." | ||
|
||
# Set configuration for the language | ||
drush config:set language.types negotiation.language_interface.enabled.$language 1 -y | ||
drush config:set language.types negotiation.language_interface.method_id language-browser -y | ||
drush config:set language.administration negotiation.language_administration_language $language -y | ||
drush user:modify 1 --langcode=$language | ||
|
||
drush config:set language.types negotiation.language_interface.enabled.$language 1 -y | ||
drush config:set language.types negotiation.language_interface.method_id language-browser -y | ||
drush config:set system.site default_langcode $language -y | ||
drush config:set system.site default_langcode $language -y | ||
|
||
# Enable multilingual support | ||
printf "\e[36mEnabling translatable Taxonomy Terms for multilingual Georeport Services...\e[0m\n" | ||
drush en markaspot_language | ||
drush cr | ||
|
||
# Enable multilingual support | ||
printf "\e[36mEnabling translatable Taxonmy Terms for multilingual Georeport Services...\e[0m\n" | ||
drush en markaspot_language | ||
drush cr | ||
else | ||
echo "Error: .po file not found. Download failed or incorrect language code." | ||
fi |