inoerp / inoERP

inoERP is an OneApp [ Go back-end & Flutter front-end ] based enterprise management system
http://docs.inoerp.com/
Mozilla Public License 2.0
767 stars 675 forks source link

0.6.1 Translations/Fixes (Help me avoid having to compare against all these modifications every time you release) #42

Closed ReactorShop closed 8 years ago

ReactorShop commented 8 years ago

image

image

image

ReactorShop commented 8 years ago

And last, since I used a manual query to add the es_MX language, the option_line table needs to be modified in order to add the es_MX language to the selection list. (the engine/install/inoerp.sql and engine/install/inoerp_prod.sql files, as far as I can tell).

image

ReactorShop commented 8 years ago

Login / Register button translated into Spanish. image

guillermohaad commented 8 years ago

Hello friend I speak Spanish and I congratulate you on your great work you did inoERp translating into our language MX.

I've done the above steps but I want to ask where I can download the file compiled messages.PO translation?

Thank you

inoerp commented 8 years ago

Thank you, ReactorShop. I need to go through all the changes before merging it to the main branch. So, it might take few days/weeks

guillermohaad commented 8 years ago

Friend @ReactorShop I have the PO file and configure MO and inoERP to take the es_MX language but keeps coming in English. And restart the apache and delete cookies

image

It can be?

Thank you

ReactorShop commented 8 years ago

@guillermohaad If you will use InoERP only in Spanish, you can do the following:

  1. Edit line 15 @ include/basics/basics.inc to be like this: defined('DEFAULT_LOCALE') ? null : define('DEFAULT_LOCALE', 'es_MX');
  2. Restart the Windows Apache2.X or Linux Apache2 service. This will clear the current messages.mo file loaded and will allow it to be replaced by the default locale language file indicated. Make sure the messages.mo file it's approximately 263kb~264kb. A 0kb sized messages.mo file may cause the situation you're describing.
  3. Clear browser cache, not only cookies. This will avoid loading an older webpage version stored in your testing computer. These steps will make the inoERP interface to load in Spanish even before login in. You will need the locale/es_MX folder structure with the po/mo files you already have. If the language is not switching to Spanish, make sure that the include/basics/basics.inc and locale/gettext.inc files have the php_uname modifications as they are in this pull request, then restart Apache and then clear browser cache again.

@inoerp The modifications are really straightforward. Where there was a text, there is now that same text enclosed inside a gettext function.

I've been testing 0.5.1, and the only issue I notice, is that I can't login from the user popup login template, but on the second time I try to login, now from the user login template, I do get access.

I haven't tested the application enough, though.

guillermohaad commented 8 years ago

thanks friend @ReactorShop I'll try and inform you.

ReactorShop commented 8 years ago

@guillermohaad One last thing. Due to the use of gettext to translate, and because of the issues that gettext inherently has, loading a language different than English requires to modify line 15 @ include/basics/basics.inc as indicated 2 posts above so that the language different than English loads from the start. After applying this modification, it's required to restart Apache, clear browser cache and load inoERP.

Because of the way gettext works, you can't switch languages on the fly. Every language switch requires changing the default locale language, restarting Apache, clearing browser cache and then you can load inoERP. This means that the language selector inside inoERP will not work, because with every language switch, you need to restart Apache and clear broswer cache, but since you are already inside inoERP you no longer can restart Apache and clear browser cache.

@inoerp I forgot to say that I loaded 0.6.1 with my modifications as an Eclipse project and checked for errors. No errors were found, but there are still some html warnings not caused by my modification that need to be checked (eg. The use of "<a name ..." is no longer valid on HTML 5).

Regarding translations, I would recommend to check how Wordpress handles them. It has a function set that loads a text domain file into memory and uses a redefined () function to look for the translations inside this domain file loaded into memory as an array. You can switch languages on the fly, because it simply clears the array. and then loads the other language messages file into this array and the redefined () function continues looking for translations inside this array.

I even created a function that would allow me to add more text domain files at the end of the Wordpress translations array, so that I could keep the original Wordpress translation text domain file unmodified.

guillermohaad commented 8 years ago

Thanks you friend @ReactorShop for your recommendations, I will set.

ReactorShop commented 8 years ago

@inoerp I've just updated pull request #42 with your latest commits.

guillermohaad commented 8 years ago

Hi friend @ReactorShop,

download of version inoERP-master 0.6.1 I step all the notes indicas but keeps coming in English. I am using Mozilla and inoERP browser on Windows 10.

I'll be doing something wrong?

Note: I did not understand this point "If the language is not switching to Spanish, make sure that the include/basics/basics.inc and locale/gettext.inc files have the php_uname modifications as they are in this pull request, "

Thank you

image

guillermohaad commented 8 years ago

HI @ReactorShop @inoerp

I found a bug in the version 0.6.1: when I try to change language preferences. AL change the Spanish language, I turn to enter the inoerp user or admin and says wrong password; I go to the table and do a query and see that the column password is empty ???

attached image.

image

image

guillermohaad commented 7 years ago

Hi friend @ReactorShop, some help with the language change? thank you