Skip to content

Commit

Permalink
New: Add a page to explain how to make translations (only on not
Browse files Browse the repository at this point in the history
complete translation languages)
  • Loading branch information
eldy committed Mar 7, 2012
1 parent 4e99563 commit b08848e
Show file tree
Hide file tree
Showing 11 changed files with 142 additions and 55 deletions.
10 changes: 2 additions & 8 deletions htdocs/admin/sms.php
Expand Up @@ -143,12 +143,6 @@
if (preg_match('/^win/i',PHP_OS)) $linuxlike=0;
if (preg_match('/^mac/i',PHP_OS)) $linuxlike=0;



/*
* View
*/

$wikihelp='EN:Setup Sms|FR:Paramétrage Sms|ES:Configuración Sms';
llxHeader('',$langs->trans("Setup"),$wikihelp);

Expand Down Expand Up @@ -349,7 +343,7 @@
}


$db->close();

llxFooter();

$db->close();
?>
72 changes: 72 additions & 0 deletions htdocs/admin/translation.php
@@ -0,0 +1,72 @@
<?php
/* Copyright (C) 2007-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2009 Regis Houssin <regis@dolibarr.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

/**
* \file htdocs/admin/translation.php
* \brief Page to show translation information
*/

require("../main.inc.php");
require_once(DOL_DOCUMENT_ROOT."/core/lib/admin.lib.php");

$langs->load("companies");
$langs->load("products");
$langs->load("admin");
$langs->load("sms");
$langs->load("other");
$langs->load("errors");

if (!$user->admin) accessforbidden();


$action=GETPOST('action');


/*
* Actions
*/

// None



/*
* View
*/

$wikihelp='EN:Setup|FR:Paramétrage|ES:Configuración';
llxHeader('',$langs->trans("Setup"),$wikihelp);

print_fiche_titre($langs->trans("TranslationSetup"),'','setup');

print $langs->trans("TranslationDesc")."<br>\n";
print "<br>\n";

dol_htmloutput_mesg($message);

print $langs->trans("CurrentUserLanguage").': <strong>'.$langs->defaultlang.'</strong><br>';
print img_warning().' '.$langs->trans("SomeTranslationAreUncomplete").'<br>';

$urlwikitranslatordoc='http://wiki.dolibarr.org/index.php/Translator_documentation';
print $langs->trans("SeeAlso").': <a href="'.$urlwikitranslatordoc.'" target="_blank">'.$urlwikitranslatordoc.'</a><br>';


llxFooter();

$db->close();
?>
95 changes: 56 additions & 39 deletions htdocs/core/menus/standard/eldy.lib.php
Expand Up @@ -629,52 +629,69 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after)
$langs->load("admin");
$langs->load("help");

// Setup
$newmenu->add("/admin/index.php?leftmenu=setup", $langs->trans("Setup"), 0, 1, '', $mainmenu, 'setup');
if ($leftmenu=="setup") $newmenu->add("/admin/company.php", $langs->trans("MenuCompanySetup"),1);
if ($leftmenu=="setup") $newmenu->add("/admin/modules.php", $langs->trans("Modules"),1);
if ($leftmenu=="setup") $newmenu->add("/admin/menus.php", $langs->trans("Menus"),1);
if ($leftmenu=="setup") $newmenu->add("/admin/ihm.php", $langs->trans("GUISetup"),1);
if ($leftmenu=="setup") $newmenu->add("/admin/boxes.php", $langs->trans("Boxes"),1);
if ($leftmenu=="setup") $newmenu->add("/admin/delais.php",$langs->trans("Alerts"),1);

if ($leftmenu=="setup") $newmenu->add("/admin/proxy.php", $langs->trans("Security"),1);
if ($leftmenu=="setup") $newmenu->add("/admin/limits.php", $langs->trans("MenuLimits"),1);
if ($leftmenu=="setup") $newmenu->add("/admin/pdf.php", $langs->trans("PDF"),1);
if ($leftmenu=="setup") $newmenu->add("/admin/mails.php", $langs->trans("Emails"),1);
if ($leftmenu=="setup") $newmenu->add("/admin/sms.php", $langs->trans("Sms"),1);
if ($leftmenu=="setup") $newmenu->add("/admin/dict.php", $langs->trans("DictionnarySetup"),1);
if ($leftmenu=="setup") $newmenu->add("/admin/const.php", $langs->trans("OtherSetup"),1);
if ($leftmenu=="setup")
{
$newmenu->add("/admin/company.php", $langs->trans("MenuCompanySetup"),1);
$newmenu->add("/admin/modules.php", $langs->trans("Modules"),1);
$newmenu->add("/admin/menus.php", $langs->trans("Menus"),1);
$newmenu->add("/admin/ihm.php", $langs->trans("GUISetup"),1);
if (! in_array($langs->defaultlang,array('en_US','en_GB','en_NZ','en_AU','fr_FR','fr_BE','es_ES','ca_ES')))
{
if ($leftmenu=="setup") $newmenu->add("/admin/translation.php", $langs->trans("Translation"),1);
}
$newmenu->add("/admin/boxes.php", $langs->trans("Boxes"),1);
$newmenu->add("/admin/delais.php",$langs->trans("Alerts"),1);
$newmenu->add("/admin/proxy.php", $langs->trans("Security"),1);
$newmenu->add("/admin/limits.php", $langs->trans("MenuLimits"),1);
$newmenu->add("/admin/pdf.php", $langs->trans("PDF"),1);
$newmenu->add("/admin/mails.php", $langs->trans("Emails"),1);
$newmenu->add("/admin/sms.php", $langs->trans("Sms"),1);
$newmenu->add("/admin/dict.php", $langs->trans("DictionnarySetup"),1);
$newmenu->add("/admin/const.php", $langs->trans("OtherSetup"),1);
}

// System info
$newmenu->add("/admin/system/index.php?leftmenu=system", $langs->trans("SystemInfo"), 0, 1, '', $mainmenu, 'system');
if ($leftmenu=="system") $newmenu->add("/admin/system/dolibarr.php", $langs->trans("Dolibarr"),1);
if ($leftmenu=="system") $newmenu->add("/admin/system/constall.php", $langs->trans("AllParameters"),2);
if ($leftmenu=="system") $newmenu->add("/admin/system/modules.php", $langs->trans("Modules"),2);
if ($leftmenu=="system") $newmenu->add("/admin/triggers.php", $langs->trans("Triggers"),2);
if ($leftmenu=="system") $newmenu->add("/admin/system/about.php", $langs->trans("About"),2);
if ($leftmenu=="system") $newmenu->add("/admin/system/os.php", $langs->trans("OS"),1);
if ($leftmenu=="system") $newmenu->add("/admin/system/web.php", $langs->trans("WebServer"),1);
if ($leftmenu=="system") $newmenu->add("/admin/system/phpinfo.php", $langs->trans("Php"),1);
//if ($leftmenu=="system" && function_exists('xdebug_is_enabled')) $newmenu->add("/admin/system/xdebug.php", $langs->trans("XDebug"),1);
if ($leftmenu=="system") $newmenu->add("/admin/system/database.php", $langs->trans("Database"),1);
if ($leftmenu=="system") $newmenu->add("/admin/system/database-tables.php", $langs->trans("Tables"),2);
if ($leftmenu=="system") $newmenu->add("/admin/system/database-tables-contraintes.php", $langs->trans("Constraints"),2);

if ($leftmenu=="system")
{
$newmenu->add("/admin/system/dolibarr.php", $langs->trans("Dolibarr"),1);
$newmenu->add("/admin/system/constall.php", $langs->trans("AllParameters"),2);
$newmenu->add("/admin/system/modules.php", $langs->trans("Modules"),2);
$newmenu->add("/admin/triggers.php", $langs->trans("Triggers"),2);
$newmenu->add("/admin/system/about.php", $langs->trans("About"),2);
$newmenu->add("/admin/system/os.php", $langs->trans("OS"),1);
$newmenu->add("/admin/system/web.php", $langs->trans("WebServer"),1);
$newmenu->add("/admin/system/phpinfo.php", $langs->trans("Php"),1);
//if (function_exists('xdebug_is_enabled')) $newmenu->add("/admin/system/xdebug.php", $langs->trans("XDebug"),1);
$newmenu->add("/admin/system/database.php", $langs->trans("Database"),1);
$newmenu->add("/admin/system/database-tables.php", $langs->trans("Tables"),2);
$newmenu->add("/admin/system/database-tables-contraintes.php", $langs->trans("Constraints"),2);
}
// System info
$newmenu->add("/admin/tools/index.php?leftmenu=admintools", $langs->trans("SystemTools"), 0, 1, '', $mainmenu, 'admintools');
if ($leftmenu=="admintools") $newmenu->add("/admin/tools/dolibarr_export.php", $langs->trans("Backup"),1);
if ($leftmenu=="admintools") $newmenu->add("/admin/tools/dolibarr_import.php", $langs->trans("Restore"),1);
if ($leftmenu=="admintools") $newmenu->add("/admin/tools/update.php", $langs->trans("MenuUpgrade"),1);
if ($leftmenu=="admintools" && function_exists('eaccelerator_info')) $newmenu->add("/admin/tools/eaccelerator.php", $langs->trans("EAccelerator"),1);
if ($leftmenu=="admintools") $newmenu->add("/admin/tools/listevents.php", $langs->trans("Audit"),1);
if ($leftmenu=="admintools") $newmenu->add("/admin/tools/listsessions.php", $langs->trans("Sessions"),1);
if ($leftmenu=="admintools") $newmenu->add("/admin/tools/purge.php", $langs->trans("Purge"),1);
if ($leftmenu=="admintools") $newmenu->add("/support/index.php", $langs->trans("HelpCenter"),1,1,'targethelp');
if ($leftmenu=="admintools")
{
$newmenu->add("/admin/tools/dolibarr_export.php", $langs->trans("Backup"),1);
$newmenu->add("/admin/tools/dolibarr_import.php", $langs->trans("Restore"),1);
$newmenu->add("/admin/tools/update.php", $langs->trans("MenuUpgrade"),1);
if (function_exists('eaccelerator_info')) $newmenu->add("/admin/tools/eaccelerator.php", $langs->trans("EAccelerator"),1);
$newmenu->add("/admin/tools/listevents.php", $langs->trans("Audit"),1);
$newmenu->add("/admin/tools/listsessions.php", $langs->trans("Sessions"),1);
$newmenu->add("/admin/tools/purge.php", $langs->trans("Purge"),1);
$newmenu->add("/support/index.php", $langs->trans("HelpCenter"),1,1,'targethelp');
}
}

$newmenu->add("/user/home.php?leftmenu=users", $langs->trans("MenuUsersAndGroups"), 0, 1, '', $mainmenu, 'users');
if ($leftmenu=="users") $newmenu->add("/user/index.php", $langs->trans("Users"), 1, $user->rights->user->user->lire || $user->admin);
if ($leftmenu=="users") $newmenu->add("/user/fiche.php?action=create", $langs->trans("NewUser"),2, $user->rights->user->user->creer || $user->admin);
if ($leftmenu=="users") $newmenu->add("/user/group/index.php", $langs->trans("Groups"), 1, ($conf->global->MAIN_USE_ADVANCED_PERMS?$user->rights->user->group_advance->read:$user->rights->user->user->lire) || $user->admin);
if ($leftmenu=="users") $newmenu->add("/user/group/fiche.php?action=create", $langs->trans("NewGroup"), 2, ($conf->global->MAIN_USE_ADVANCED_PERMS?$user->rights->user->group_advance->write:$user->rights->user->user->creer) || $user->admin);
if ($leftmenu=="users")
{
$newmenu->add("/user/index.php", $langs->trans("Users"), 1, $user->rights->user->user->lire || $user->admin);
$newmenu->add("/user/fiche.php?action=create", $langs->trans("NewUser"),2, $user->rights->user->user->creer || $user->admin);
$newmenu->add("/user/group/index.php", $langs->trans("Groups"), 1, ($conf->global->MAIN_USE_ADVANCED_PERMS?$user->rights->user->group_advance->read:$user->rights->user->user->lire) || $user->admin);
$newmenu->add("/user/group/fiche.php?action=create", $langs->trans("NewGroup"), 2, ($conf->global->MAIN_USE_ADVANCED_PERMS?$user->rights->user->group_advance->write:$user->rights->user->user->creer) || $user->admin);
}
}


Expand Down
7 changes: 3 additions & 4 deletions htdocs/install/index.php
Expand Up @@ -19,14 +19,13 @@
/**
* \file htdocs/install/index.php
* \ingroup install
* \brief Affichage page selection langue si premiere install.
* Si reinstall, passe directement a la page check.php
* \brief Show page to select language. This is done only for a first installation.
* For a reinstall this page redirect to page check.php
*/
include_once("./inc.php");
include_once("../core/class/html.form.class.php");
include_once("../core/class/html.formadmin.class.php");


$err = 0;

// Si fichier conf existe deja et rempli, on est pas sur une premiere install,
Expand All @@ -46,7 +45,7 @@

$formadmin=new FormAdmin(''); // Note: $db does not exist yet but we don't need it, so we put ''.

pHeader("", "check"); // Etape suivante = index2
pHeader("", "check"); // Etape suivante = check


print '<center>';
Expand Down
2 changes: 1 addition & 1 deletion htdocs/langs/da_DK/admin.lang
Expand Up @@ -1262,7 +1262,7 @@ DelaysOfToleranceSuppliersOrdersToProcess=Forsinkelse tolerance (i dage) før al
SecurityEventsPurged=Sikkerhed begivenheder renset
ShowProfIdInAddress=Vis Professionel id med adresser på dokumenter
TranslationUncomplete=Delvis oversættelse
SomeTranslationAreUncomplete=Nogle sprog kan være delvist oversættes eller kan indeholder fejl. Hvis du opdager noget, kan du <b>rette. Lang</b> tekst filer i mappen <b>htdocs / Langs</b> og sende dem på forum i <a href="http://www.dolibarr.org/forum" target="_blank">http://www.dolibarr.org</a> .
SomeTranslationAreUncomplete=Nogle sprog kan være delvist oversættes eller kan indeholder fejl. Hvis du opdager noget, kan du <b>rette. Lang</b> tekst filer i mappen <b>htdocs/langs</b> og sende dem på forum i <a href="http://www.dolibarr.org/forum" target="_blank">http://www.dolibarr.org</a> .
MenuUseLayout=Gør lodret menu hidable (option javascript må ikke være deaktiveret)
MAIN_DISABLE_METEO=Deaktiver Meteo udsigt
TestLoginToAPI=Test logge på API
Expand Down
2 changes: 2 additions & 0 deletions htdocs/langs/en_US/admin.lang
Expand Up @@ -865,6 +865,8 @@ SendmailOptionNotComplete=Warning, on some Linux systems, to send email from you
PathToDocuments=Path to documents
PathDirectory=Directory
SendmailOptionMayHurtBuggedMTA=Feature to send mails using method "PHP mail direct" will generate a mail message that might be not correctly parsed by some receiving mail servers. Result is that some mails can't be read by people hosted by thoose bugged platforms. It's case for some Internet providers (Ex: Orange in France). This is not a problem into Dolibarr nor into PHP but onto receiving mail server. You can however add option MAIN_FIX_FOR_BUGGED_MTA to 1 into setup - other to modify Dolibarr to avoid this. However, you may experience problem with other servers that respect strictly the SMTP standard. The other solution (recommanded) is to use the method "SMTP socket library" that has no disadvantages.
TranslationSetup=Configuration de la traduction
TranslationDesc=Choice of language visible on screen can be modified:<br>* Globally from menu <strong>Home - Setup - Display</strong><br>* For user only from tab <strong>User display</strong> of user card (click on login on top of screen).

##### Module password generation
PasswordGenerationStandard=Return a password generated according to internal Dolibarr algorithm: 8 characters containing shared numbers and characters in lowercase.
Expand Down
1 change: 1 addition & 0 deletions htdocs/langs/en_US/main.lang
Expand Up @@ -49,6 +49,7 @@ ErrorNoSocialContributionForSellerCountry=Error, no social contribution type def
ErrorFailedToSaveFile=Error, failed to save file.
ErrorOnlyPngJpgSupported=Error, only .png and .jpg image format file are supported.
ErrorImageFormatNotSupported=Your PHP does not support functions to convert images of this format.
SeeAlso=See also %s
BackgroundColorByDefault=Default background color
FileWasNotUploaded=A file is selected for attachment but was not yet uploaded. Click on "Attach file" for this.
NbOfEntries=Nb of entries
Expand Down
3 changes: 2 additions & 1 deletion htdocs/langs/fr_FR/admin.lang
Expand Up @@ -873,7 +873,8 @@ SendmailOptionNotComplete=Attention, sur certains systèmes Linux, avec cette m
PathToDocuments= Chemin d'accès aux documents
PathDirectory= Répertoire
SendmailOptionMayHurtBuggedMTA=La fonction d'envoi de mails par la méthode "PHP mail directe" génère une requete mail qui peut être mal interprété par certains serveurs buggués de réception de mail. Cela se traduit par des mails non lisibles chez les personnes hebergés par ces plateformes bugguées. C'est le cas des clients de certains fournisseurs d'accès internet (Ex: Orange). Ce n'est pas un problème ni dans Dolibarr ni dans PHP mais sur le serveur de réception. Vous pouvez toutefois ajouter l'option MAIN_FIX_FOR_BUGGED_MTA à 1 dans configuration - divers pour modifier Dolibarr afin de compenser le bug. Toutefois ce sont les serveurs respectueux du standard d'envoi de mail qui pourront avoir des problèmes. L'autre solution (recommandée) est d'utiliser la méthode d'envoi SMTP socket library qui n'a aucun de ces inconvénients.

TranslationSetup=Translation setup
TranslationDesc=Le choix de la langue affichée à l'écran se modifie:<br>* Soit de manière globale depuis le menu <strong>Accueil - Configuration - Affichage</strong><br>* Soit de manière spécifique à l'utilisateur depuis l'onglet <strong>Interface utilisateur</strong> de sa fiche utilisateur (cliquer sur le login en haut de l'écran).
##### Module password generation= undefined
PasswordGenerationStandard= Renvoie un mot de passe généré selon algorithme interne Dolibarr: 8 caractères, chiffres et caractères en minuscules mélangés.
PasswordGenerationNone= Ne propose pas de mots de passe générés. Le mot de passe est à saisir manuellement.
Expand Down
1 change: 1 addition & 0 deletions htdocs/langs/fr_FR/main.lang
Expand Up @@ -49,6 +49,7 @@ ErrorNoSocialContributionForSellerCountry=Erreur, aucun type de charges défini
ErrorFailedToSaveFile=Erreur, l'enregistrement du fichier a échoué.
ErrorOnlyPngJpgSupported=Erreur, seuls les formats images .jpg et .png sont supportés.
ErrorImageFormatNotSupported=Votre PHP ne supporte pas les fonctions de conversion de ce format d'image.
SeeAlso=Voir aussi %s
BackgroundColorByDefault=Couleur de fond
FileWasNotUploaded=Un fichier a été sélectionné pour attachement mais n'a pas encore été uploadé. Cliquez sur "Joindre ce fichier" pour cela.
NbOfEntries=Nb d'entrées
Expand Down
2 changes: 1 addition & 1 deletion htdocs/langs/pt_PT/admin.lang
Expand Up @@ -1277,7 +1277,7 @@ DelaysOfToleranceSuppliersOrdersToProcess=Tolerância de atraso (em dias) antes
SecurityEventsPurged=Os eventos de segurança purgado
ShowProfIdInAddress=Mostrar ID professionnal com endereços em documentos
TranslationUncomplete=Tradução parcial
SomeTranslationAreUncomplete=Alguns idiomas podem ser parcialmente traduzido ou pode conter erros. Se detectar algum, você pode <b>corrigir.</b> Arquivos de texto <b>lang</b> em diretório <b>htdocs / Langs</b> e submetê-los no fórum em <a href="http://www.dolibarr.org/forum" target="_blank">http://www.dolibarr.org</a> .
SomeTranslationAreUncomplete=Alguns idiomas podem ser parcialmente traduzido ou pode conter erros. Se detectar algum, você pode <b>corrigir.</b> Arquivos de texto <b>lang</b> em diretório <b>htdocs/langs</b> e submetê-los no fórum em <a href="http://www.dolibarr.org/forum" target="_blank">http://www.dolibarr.org</a> .
MenuUseLayout=Faça menu vertical hidable (javascript opção não deve ser desativado)
MAIN_DISABLE_METEO=Desativar meteo vista
TestLoginToAPI=Teste o login para API
Expand Down

0 comments on commit b08848e

Please sign in to comment.