Download translations from Transifex

Hello,
ok but i didn’t fin out how to get the translation pack
i have missed something ;(
(i’m interested by the french language pack)

How to start a local Transifex project - Keep Calm and Translate Joomla - https://sites.google.com/site/transjoomla/transifex-tutorials/start-local-project
Note: you should use my config file for the TX client: https://dl.dropboxusercontent.com/u/441710/Transifex/SuiteCRM.ini

I have installed the ‘tx’ client (on Mac and with www.macport.org)

$ sudo pip-2.7 install transifex-client

adding tx to my path by adding a line in my ~/.profile :
export PATH=$PATH:/opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin

make a folder

$ mkdir transiflex_suitecrm

get into

$ cd transiflex_suitecrm

do an init

$ tx init

this ask to set a project name, my user and login

edit the .tx/config file and replace by the content of file located : https://dl.dropboxusercontent.com/u/441710/Transifex/SuiteCRM.ini

do a

$ tx pull

but i have
Exception: No user credentials found for host https://www.transifex.com. Edit ~/.transifexrc and add the appropriate info in there.

looked at the file ~/.transifexrc it seems OK

where i’m wrong ? :wink:

@Will: can you split this topic?

Did you verify your account on transifex? What is your account name there?

Verify the URL in the .transifexrc file. It should be a https as in:

[https://www.transifex.com]
hostname = https://www.transifex.com
password =
token = 
username = 

include your password and your username.
Token will be blank
The username is the user account as in bunam if you are https://www.transifex.com/accounts/profile/bunam/

To download: Try (for french)

tx.exe pull -l fr_FR

it’s ok with ~/.transifexrc :slight_smile:

[https://www.transifex.com]
hostname = https://www.transifex.com
password = ***********
token = 
username = <myusername>

and a

$ tx pull -a

Note:

After downloading you need to edit these 3 files (pt_PT is for portuguse, your language code will be different)
T\include\language\pt_PT.lang.php
\modules\ModuleBuilder\language\pt_PT.lang.php
\install\language\pt_PT.lang.php

WHY and WHAT?
Because there are strings with duplicated names on the same SUITECRM language file I had to change the original string names so they are not ignored.
On those 3 files you need to remove some extra text on some string names. The text to be removed goes from “_tx1” to “_tx18” (you can do a search and reply!

So:

'Home_tx1'

Will be

'Home'

Hope someday there will be a way to avoid that by revising those language files on the master files!

For a full language pack you can also include extra files from external applications (to be inclued in the INCLUDE and JSCALENDAR folders)

Languages are available at:

1- \include\phpmailer
PHPMailer/language at master - https://github.com/PHPMailer/PHPMailer/tree/master/language

2- include\HTMLPurifier
HTML Purifier - Translations: https://www.transifex.com/projects/p/htmlpurifier/

3- \include\javascript\tiny_mce
TinyMCE localization - https://www.transifex.com/projects/p/tinymce/
Download translations: http://www.tinymce.com/i18n/index.php

4- \include\javascript\yui3\build\datatype\lang
YUI Library - http://yuilibrary.com - IMPORTANT: The YUI library is no longer actively maintained

5- \jscalendar\lang
Languages are included in the zip to downlaod: http://sourceforge.net/projects/jscalendar/files/jscalendar/

6- \modules\AOS_PDF_Templates\PDF_Lib
Hyphenator - https://code.google.com/p/hyphenator/
(download for patterns files)

And its official… we need a WIKI!!!

1 Like

i must do some stuff now
i will ‘built’ later to test and send results there

Can’t help you with that.
Make sure the transifex folder project is on a clear path (no spaces or extra letters)

Sometimes people on Mac had issues using TX (but they was able to make it work)
Try on a PC or linux :slight_smile:

i’v got all in ‘translations’ which is ~54 Mo now

Macs are good i have installed 1000+ desktop App and a lot of binary for command lines (on a SSD) i see Windows® slowing a lot with a little 30+ Desktops App :stuck_out_tongue:

No wars on Mac (My first computer was a Classic Plus). I was just refering on the TX client use. Had been told on issues when setup in Mac but they all get it work at the end.
So … what was the problem and how did you solved it?

it was a bad setup in ~/.transifexrc

this part wasn’t like this one :

[https://www.transifex.com]
hostname = https://www.transifex.com

Hi

Slovak team is ready to start :slight_smile:

Please allow us :slight_smile:

Miky

B)

Done. You can now invite translators for your language.

Also added Macedonian language on a separated request.
33 + 6 languages now:
https://www.transifex.com/projects/p/suitecrm/

hello,

i have done a script to remove _tx[id] and install files

#!/bin/bash

from=/Volumes/DATA/Projets/transiflex_suitecrm/translations/suitecrm/fr_FR
to=~/tmp/suite/fr_FR

rm -rf "${to}"
mkdir -p "${to}"
cp -r "${from}" "${to}"

OIFS=$IFS
IFS=$'\n'
for files in $(find "${to}" -type f -name \*.php ) ; do
	echo -n "Traitement de $files : "
	sed "s/_tx.[0-9]//g" "${files}" > "${files}".sed
	if [ $? -eq 0 ] ; then 
		mv -f "${files}".sed "${files}"
		echo "OK"
	else
		echo "ERREUR"
	fi
done
IFS=$OIFS

scp -r "${to}"/fr_FR/* root@<ServerIP>:/var/www/<myDomain>/suite/

but i can’t see the new language in admin where i’m wrong ? :wink:

i have made a mistake on the sed expression, it should be :

	sed 's/_tx[0-9]//g' "${files}" > "${files}".sed

i have modified the config file and added :

  array (
    'en_us' => 'English (US)',
    'es_es' => 'Español (ES)',
    'ru_ru' => 'Русский (RU)',
    'fr_FR' => 'Français (FR)', 
  ),

also there is bugs in php files ex :
fr_FR/include/language/fr_FR.lang.php
line 50 to 60

//to translate, only modify the right value in each key/value pair
$app_list_strings = array (

  'language_pack_name' => 'US English',
  );
  'moduleList' =>
  array (
    'Home' => 'Accueil',
    'Contacts' => 'Contacts',
    'Accounts' => 'Comptes',
    'Opportunities' => 'Affaires',

the transiflex as made more trouble

  'reminder_max_time' => '90000',
  'reminder_time_options' => array( '602'=> '1 minute prior',
                                  '3002'=> '5 minutes prior',
                                  '6002'=> '10 minutes prior',
                                  '9002'=> '15 minutes prior',
                                  '18002'=> '30 minutes prior',
                                  '36002'=> '1 hour prior',
                                  '72002' => '2 hours prior',
                                  '108002' => '3 hours prior',
                                  '180002' => '5 hours prior',
                                  '864002' => '1 day prior',
                                 ),

instead of :

'reminder_max_time' => 90000,
  'reminder_time_options' => array( 60=> '1 minute prior',
                                  300=> '5 minutes prior',
                                  600=> '10 minutes prior',
                                  900=> '15 minutes prior',
                                  1800=> '30 minutes prior',
                                  3600=> '1 hour prior',
                                  7200 => '2 hours prior',
                                  10800 => '3 hours prior',
                                  18000 => '5 hours prior',
                                  86400 => '1 day prior',
                                 ),