1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/opensondage_ynh.git synced 2024-09-03 19:46:28 +02:00

fix localization problem

This commit is contained in:
zamentur 2014-06-19 22:14:56 +02:00
parent 95dd07d7ea
commit 5fba874b70
8 changed files with 68 additions and 69 deletions

View file

@ -79,7 +79,7 @@ const LOGOLETTRE = '<chemin relatif suivi du nom du fichier du logo pour la lett
// Nom et emplacement du fichier image contenant le titre // Nom et emplacement du fichier image contenant le titre
//const IMAGE_TITRE', '<chemin relatif suivi du nom du fichier image du titre>'; //const IMAGE_TITRE', '<chemin relatif suivi du nom du fichier image du titre>';
const IMAGE_TITRE = 'images/logo.png'; const IMAGE_TITRE = './images/logo.png';
// Activation des URL propre (true pour activer, false sinon) // Activation des URL propre (true pour activer, false sinon)
const URL_PROPRE = false; const URL_PROPRE = false;

View file

@ -47,7 +47,7 @@ sudo sed -i "s/yunoadmin/$admin/g" $final_path/variables.php
sudo sed -i "s/I18NTOCHANGE/$language/g" $final_path/variables.php sudo sed -i "s/I18NTOCHANGE/$language/g" $final_path/variables.php
sudo sed -i "s@yunourl@$domain$path@g" $final_path/variables.php sudo sed -i "s@yunourl@$domain$path@g" $final_path/variables.php
sudo sed -i "s@yunodomain@$domain@g" $final_path/variables.php sudo sed -i "s@yunodomain@$domain@g" $final_path/variables.php
sudo sed -i "s/yunoinfolegal/$legal/g" $final_path/variables.php sudo sed -i "s°yunoinfolegal°$legal°g" $final_path/variables.php
# Create log file # Create log file
touch $final_path/admin/logs_studs.txt touch $final_path/admin/logs_studs.txt
@ -84,7 +84,7 @@ sudo chmod 644 $finalphpini
# Reload Nginx and regenerate SSOwat conf # Reload Nginx and regenerate SSOwat conf
sudo service php5-fpm restart sudo service php5-fpm restart
sudo apt-get install php-fpdf
sudo yunohost app addaccess opensondage -u $admin sudo yunohost app addaccess opensondage -u $admin
sudo cp ../conf/nginx.conf-public /etc/nginx/conf.d/$domain.d/opensondage.conf sudo cp ../conf/nginx.conf-public /etc/nginx/conf.d/$domain.d/opensondage.conf
sudo service nginx reload sudo service nginx reload

View file

@ -21,7 +21,7 @@ sudo sed -i "s/yunoadmin/$admin/g" $final_path/variables.php
sudo sed -i "s/I18NTOCHANGE/$language/g" $final_path/variables.php sudo sed -i "s/I18NTOCHANGE/$language/g" $final_path/variables.php
sudo sed -i "s@yunourl@$domain$path@g" $final_path/variables.php sudo sed -i "s@yunourl@$domain$path@g" $final_path/variables.php
sudo sed -i "s@yunodomain@$domain@g" $final_path/variables.php sudo sed -i "s@yunodomain@$domain@g" $final_path/variables.php
sudo sed -i "s/yunoinfolegal/$legal/g" $final_path/variables.php sudo sed -i "s°yunoinfolegal°$legal°g" $final_path/variables.php
@ -59,7 +59,7 @@ sudo sed -i "s/yunoadmin/$admin/g" $final_path/variables.php
sudo sed -i "s/I18NTOCHANGE/$language/g" $final_path/variables.php sudo sed -i "s/I18NTOCHANGE/$language/g" $final_path/variables.php
sudo sed -i "s@yunourl@$domain$path@g" $final_path/variables.php sudo sed -i "s@yunourl@$domain$path@g" $final_path/variables.php
sudo sed -i "s@yunodomain@$domain@g" $final_path/variables.php sudo sed -i "s@yunodomain@$domain@g" $final_path/variables.php
sudo sed -i "s/yunoinfolegal/$legal/g" $final_path/variables.php sudo sed -i "s°yunoinfolegal°$legal°g" $final_path/variables.php
# Create log file # Create log file
touch admin/logs_studs.txt touch admin/logs_studs.txt

View file

@ -83,11 +83,11 @@ function bandeau_tete()
{ {
if ( IMAGE_TITRE ) { if ( IMAGE_TITRE ) {
echo '<div class="bandeau"><a href="/" title="Accueil '.NOMAPPLICATION.'"><img src="' . IMAGE_TITRE. '" title="Accueil '.NOMAPPLICATION.'" alt="'.NOMAPPLICATION.'"></a></div>'."\n"; echo '<div class="bandeau"><a href="./" title="Accueil '.NOMAPPLICATION.'"><img src="' . IMAGE_TITRE. '" title="Accueil '.NOMAPPLICATION.'" alt="'.NOMAPPLICATION.'"></a></div>'."\n";
} else { } else {
echo '<div class="bandeau"><a href="/" title="Accueil '.NOMAPPLICATION.'">'.NOMAPPLICATION.'</a></div>'."\n"; echo '<div class="bandeau"><a href="./" title="Accueil '.NOMAPPLICATION.'">'.NOMAPPLICATION.'</a></div>'."\n";
} ; } ;
@ -168,11 +168,11 @@ function bandeau_pied()
//echo '<div class="bandeaupied">'. _("Universit&eacute; de Strasbourg. Creation: Guilhem BORGHESI. 2008-2009") .'</div>'."\n"; //echo '<div class="bandeaupied">'. _("Universit&eacute; de Strasbourg. Creation: Guilhem BORGHESI. 2008-2009") .'</div>'."\n";
echo '<div class="separateur">&nbsp;</div>'; echo '<div class="separateur">&nbsp;</div>';
echo '<div class="sousbandeau">' . echo '<div class="sousbandeau">' .
'<a class="button small gray" href="/">'. _("Home") .'</a>' . '<a class="button small gray" href="./">'. _("Home") .'</a>' .
'<a class="button small gray" href="' . getUrlSondage('aqg259dth55iuhwm').'">'. _("Example") .'</a>' . '<a class="button small gray" href="' . getUrlSondage('aqg259dth55iuhwm').'">'. _("Example") .'</a>' .
'<a class="button small gray" href="/contacts.php" target="_new">'. _("Contact") .'</a>' . '<a class="button small gray" href="./contacts.php" target="_new">'. _("Contact") .'</a>' .
//'<a href="/sources/sources.php">'. _("Sources") .'</a>' . //not implemented //'<a href="/sources/sources.php">'. _("Sources") .'</a>' . //not implemented
'<a class="button small gray" href="/apropos.php">'. _("About") .'</a>' . '<a class="button small gray" href="./apropos.php">'. _("About") .'</a>' .
//'<a class="button small gray" href="/admin/index.php">'. _("Admin") .'</a>' . //'<a class="button small gray" href="/admin/index.php">'. _("Admin") .'</a>' .
'<span class="sousbandeau sousbandeaulangue">' . '<span class="sousbandeau sousbandeaulangue">' .
liste_lang() . '</span>'. liste_lang() . '</span>'.
@ -187,11 +187,11 @@ function bandeau_pied_mobile()
'<div class="bandeaupiedmobile">'. _("Universit&eacute; de Strasbourg. Creation: Guilhem BORGHESI. 2008-2009") .'</div>'."\n";*/ '<div class="bandeaupiedmobile">'. _("Universit&eacute; de Strasbourg. Creation: Guilhem BORGHESI. 2008-2009") .'</div>'."\n";*/
echo '<div class="separateur">&nbsp;</div>'; echo '<div class="separateur">&nbsp;</div>';
echo '<div class="sousbandeau">' . echo '<div class="sousbandeau">' .
'<a class="button small gray" href="/">'. _("Home") .'</a>' . '<a class="button small gray" href="./">'. _("Home") .'</a>' .
'<a class="button small gray" href="' . getUrlSondage('aqg259dth55iuhwm').'">'. _("Example") .'</a>' . '<a class="button small gray" href="' . getUrlSondage('aqg259dth55iuhwm').'">'. _("Example") .'</a>' .
'<a class="button small gray" href="/contacts.php" target="_new">'. _("Contact") .'</a>' . '<a class="button small gray" href="./contacts.php" target="_new">'. _("Contact") .'</a>' .
//'<a href="/sources/sources.php">'. _("Sources") .'</a>' . //not implemented //'<a href="/sources/sources.php">'. _("Sources") .'</a>' . //not implemented
'<a class="button small gray" href="/apropos.php">'. _("About") .'</a>' . '<a class="button small gray" href="./apropos.php">'. _("About") .'</a>' .
//'<a class="button small gray" href="/admin/index.php">'. _("Admin") .'</a>' . //'<a class="button small gray" href="/admin/index.php">'. _("Admin") .'</a>' .
'<span class="sousbandeau sousbandeaulangue">' . '<span class="sousbandeau sousbandeaulangue">' .
liste_lang() . '</span>'. liste_lang() . '</span>'.

View file

@ -82,11 +82,11 @@ function bandeau_tete()
{ {
if ( IMAGE_TITRE ) { if ( IMAGE_TITRE ) {
echo '<div class="bandeau"><a href="/" title="Accueil '.NOMAPPLICATION.'"><img src="' . IMAGE_TITRE. '" title="Accueil '.NOMAPPLICATION.'" alt="'.NOMAPPLICATION.'"></a></div>'."\n"; echo '<div class="bandeau"><a href="./" title="Accueil '.NOMAPPLICATION.'"><img src="' . IMAGE_TITRE. '" title="Accueil '.NOMAPPLICATION.'" alt="'.NOMAPPLICATION.'"></a></div>'."\n";
} else { } else {
echo '<div class="bandeau"><a href="/" title="Accueil '.NOMAPPLICATION.'">'.NOMAPPLICATION.'</a></div>'."\n"; echo '<div class="bandeau"><a href="./" title="Accueil '.NOMAPPLICATION.'">'.NOMAPPLICATION.'</a></div>'."\n";
} ; } ;
@ -169,7 +169,7 @@ function bandeau_pied()
echo '<div class="sousbandeau">' . echo '<div class="sousbandeau">' .
'<a class="button small gray" href="./">'. _("Home") .'</a>' . '<a class="button small gray" href="./">'. _("Home") .'</a>' .
'<a class="button small gray" href="' . getUrlSondage('aqg259dth55iuhwm').'">'. _("Example") .'</a>' . '<a class="button small gray" href="' . getUrlSondage('aqg259dth55iuhwm').'">'. _("Example") .'</a>' .
'<a class="button small gray" href="http://contact.framasoft.org" target="_new">'. _("Contact") .'</a>' . '<a class="button small gray" href="./contacts.php" target="_new">'. _("Contact") .'</a>' .
//'<a href="sources/sources.php">'. _("Sources") .'</a>' . //not implemented //'<a href="sources/sources.php">'. _("Sources") .'</a>' . //not implemented
'<a class="button small gray" href="apropos.php">'. _("About") .'</a>' . '<a class="button small gray" href="apropos.php">'. _("About") .'</a>' .
//'<a class="button small gray" href="admin/index.php">'. _("Admin") .'</a>' . //'<a class="button small gray" href="admin/index.php">'. _("Admin") .'</a>' .
@ -188,7 +188,7 @@ function bandeau_pied_mobile()
echo '<div class="sousbandeau">' . echo '<div class="sousbandeau">' .
'<a class="button small gray" href="./">'. _("Home") .'</a>' . '<a class="button small gray" href="./">'. _("Home") .'</a>' .
'<a class="button small gray" href="' . getUrlSondage('aqg259dth55iuhwm').'">'. _("Example") .'</a>' . '<a class="button small gray" href="' . getUrlSondage('aqg259dth55iuhwm').'">'. _("Example") .'</a>' .
'<a class="button small gray" href="http://contact.framasoft.org" target="_new">'. _("Contact") .'</a>' . '<a class="button small gray" href="./contacts.php" target="_new">'. _("Contact") .'</a>' .
//'<a href="sources/sources.php">'. _("Sources") .'</a>' . //not implemented //'<a href="sources/sources.php">'. _("Sources") .'</a>' . //not implemented
'<a class="button small gray" href="apropos.php">'. _("About") .'</a>' . '<a class="button small gray" href="apropos.php">'. _("About") .'</a>' .
//'<a class="button small gray" href="admin/index.php">'. _("Admin") .'</a>' . //'<a class="button small gray" href="admin/index.php">'. _("Admin") .'</a>' .

View file

@ -9,14 +9,13 @@ if (isset($_GET['lang']) && is_string($_GET['lang']) && in_array($_GET['lang'],
$mlocale = LANGUE ; $mlocale = LANGUE ;
} }
$locale = $mlocale . '.utf8'; $locale = $mlocale . '.UTF-8';
putenv('LANGUAGE='); putenv('LANGUAGE='.'C.UTF-8');
setlocale(LC_ALL, $locale); setlocale(LC_ALL, 'C.UTF-8');
setlocale(LC_TIME, $locale); setlocale(LC_TIME, $locale);
setlocale(LC_MESSAGES, $locale); setlocale(LC_MESSAGES, 'C.UTF-8');
$domain = 'Studs'; $domain = 'Studs';
bindtextdomain($domain, 'locale'); bindtextdomain($domain, 'locale/'.$mlocale);
bind_textdomain_codeset($domain, 'UTF-8'); bind_textdomain_codeset($domain, 'UTF-8');
textdomain($domain); textdomain($domain);

View file

@ -798,71 +798,71 @@ msgstr "Voir le sondage"
msgid "Change the poll" msgid "Change the poll"
msgstr "Modifier le sondage" msgstr "Modifier le sondage"
#~ msgid "Enter a name!" ~ msgid "Enter a name!"
#~ msgstr "Vous n'avez pas saisi de nom !" ~ msgstr "Vous n'avez pas saisi de nom !"
#~ msgid "monday" ~ msgid "monday"
#~ msgstr "lundi" ~ msgstr "lundi"
#~ msgid "tuesday" ~ msgid "tuesday"
#~ msgstr "mardi" ~ msgstr "mardi"
#~ msgid "wednesday" ~ msgid "wednesday"
#~ msgstr "mercredi" ~ msgstr "mercredi"
#~ msgid "thursday" ~ msgid "thursday"
#~ msgstr "jeudi" ~ msgstr "jeudi"
#~ msgid "friday" ~ msgid "friday"
#~ msgstr "vendredi" ~ msgstr "vendredi"
#~ msgid "saturday" ~ msgid "saturday"
#~ msgstr "samedi" ~ msgstr "samedi"
#~ msgid "sunday" ~ msgid "sunday"
#~ msgstr "dimanche" ~ msgstr "dimanche"
#~ msgid "january" ~ msgid "january"
#~ msgstr "janvier" ~ msgstr "janvier"
#~ msgid "february" ~ msgid "february"
#~ msgstr "f&eacute;vrier" ~ msgstr "f&eacute;vrier"
#~ msgid "march" ~ msgid "march"
#~ msgstr "mars" ~ msgstr "mars"
#~ msgid "april" ~ msgid "april"
#~ msgstr "avril" ~ msgstr "avril"
#~ msgid "may" ~ msgid "may"
#~ msgstr "mai" ~ msgstr "mai"
#~ msgid "june" ~ msgid "june"
#~ msgstr "juin" ~ msgstr "juin"
#~ msgid "july" ~ msgid "july"
#~ msgstr "juillet" ~ msgstr "juillet"
#~ msgid "august" ~ msgid "august"
#~ msgstr "ao&ucirc;t" ~ msgstr "ao&ucirc;t"
#~ msgid "september" ~ msgid "september"
#~ msgstr "septembre" ~ msgstr "septembre"
#~ msgid "october" ~ msgid "october"
#~ msgstr "octobre" ~ msgstr "octobre"
#~ msgid "november" ~ msgid "november"
#~ msgstr "novembre" ~ msgstr "novembre"
#~ msgid "december" ~ msgid "december"
#~ msgstr "d&eacute;cembre" ~ msgstr "d&eacute;cembre"
#~ msgid "Sources" ~ msgid "Sources"
#~ msgstr "Sources" ~ msgstr "Sources"
#~ msgid "Back" ~ msgid "Back"
#~ msgstr "Retour" ~ msgstr "Retour"
#~ msgid "" #~ msgid ""
#~ "Here are the <a href=\"http://sourcesup.cru.fr/frs/?" #~ "Here are the <a href=\"http://sourcesup.cru.fr/frs/?"

View file

@ -72,14 +72,14 @@ const BASE_TYPE = '<type de BDD>';
const LANGUE = 'fr_FR'; const LANGUE = 'fr_FR';
// Nom et emplacement du logo // Nom et emplacement du logo
const LOGOBANDEAU = 'images/logo.png'; const LOGOBANDEAU = './images/logo.png';
// Nom et emplacement du logo de la lettre générée en PDF // Nom et emplacement du logo de la lettre générée en PDF
const LOGOLETTRE = '<chemin relatif suivi du nom du fichier du logo pour la lettre>'; const LOGOLETTRE = '<chemin relatif suivi du nom du fichier du logo pour la lettre>';
// Nom et emplacement du fichier image contenant le titre // Nom et emplacement du fichier image contenant le titre
//const IMAGE_TITRE', '<chemin relatif suivi du nom du fichier image du titre>'; //const IMAGE_TITRE', '<chemin relatif suivi du nom du fichier image du titre>';
const IMAGE_TITRE = 'images/logo.png'; const IMAGE_TITRE = './images/logo.png';
// Activation des URL propre (true pour activer, false sinon) // Activation des URL propre (true pour activer, false sinon)
const URL_PROPRE = false; const URL_PROPRE = false;