Dynamic pull translations from Joomla where they already have those strings translated #261

Closed
opened 2018-04-12 00:47:11 +00:00 by bosyrih · 16 comments
bosyrih commented 2018-04-12 00:47:11 +00:00 (Migrated from github.com)

Feature Request (new issue)

Can we make the translation language take language translation from joomla translation and concat it with component name, with this method we can save a lot of time with translation.
you know that joomla had translated to 74 language that mean all of main words and terms have translate like (save,edit,permission ...) .
so we can find the language the JCB installed in joomla and take the translated string and concat them with component name

Steps to reproduce the issue (original issue - resolved)

1- go to language. define new languages , name: Arabic, language tag: ar-AA with space after AA.
2- go to Language Translations and translate some text,
3- compile component. meesage about languge installer that can't be copy after installation.
4- go back to step 1 and correct language tag to be ar-AA without space after AA.
5- go to Language Translations and translate some test.
6- compile component. there is two language file on with ar-AA without space and one with space.
and you need to resave all the text with ar-AA with space with the correct language tag.

Expected result

when you change language tag from languages your old Language Translations text that connected with this language name must be change too.

Actual result

lose of all language tag in Language Translations texts. and you need to resave them.

System information (as much as possible)

  • OS Name & Version:
  • MySql Version:
  • Apache Version: Apache/2.4.29 (Win32) OpenSSL/1.1.0g PHP/7.2.2
  • PHP Version: 7.2.2
  • Joomla Version: 3.8.5
  • JCB Version: 2.7.1
  • Browser:

Additional comments

### Feature Request (new issue) Can we make the translation language take language translation from joomla translation and concat it with component name, with this method we can save a lot of time with translation. you know that joomla had translated to 74 language that mean all of main words and terms have translate like (save,edit,permission ...) . so we can find the language the JCB installed in joomla and take the translated string and concat them with component name ### Steps to reproduce the issue (original issue - resolved) 1- go to language. define new languages , name: Arabic, language tag: ar-AA with space after AA. 2- go to Language Translations and translate some text, 3- compile component. meesage about languge installer that can't be copy after installation. 4- go back to step 1 and correct language tag to be ar-AA without space after AA. 5- go to Language Translations and translate some test. 6- compile component. there is two language file on with ar-AA without space and one with space. and you need to resave all the text with ar-AA with space with the correct language tag. ### Expected result when you change language tag from languages your old Language Translations text that connected with this language name must be change too. ### Actual result lose of all language tag in Language Translations texts. and you need to resave them. ### System information (as much as possible) - OS Name & Version: - MySql Version: - Apache Version: Apache/2.4.29 (Win32) OpenSSL/1.1.0g PHP/7.2.2 - PHP Version: 7.2.2 - Joomla Version: 3.8.5 - JCB Version: 2.7.1 - Browser: ### Additional comments

The best I can do is to trim empty space around the language tag, to insure it does not happen again, that a typo can cause so much pain. But for the need of fast execution during compilation we link the strings to the actual language tag and not the id. This can not be changed, sorry!

The best I can do is to trim empty space around the language tag, to insure it does not happen again, that a typo can cause so much pain. But for the need of fast execution during compilation we link the strings to the actual language tag and not the id. This can not be changed, sorry!

So in the next update the patch will be included to fix this, let me know if you have any further questions.

So in the next update the patch will be included to fix this, let me know if you have any further questions.
bosyrih commented 2018-04-13 18:11:45 +00:00 (Migrated from github.com)

Hi,
thanks .
Can we make the translation language take language translation from joomla translation and concat it with component name, with this method we can save a lot of time with translation.
you know that joomla had translated to 74 language that mean all of main words and terms have translate like (save,edit,permission ...) .
so we can find the language the JCB installed in joomla and take the translated string and concat them with component name

Hi, thanks . Can we make the translation language take language translation from joomla translation and concat it with component name, with this method we can save a lot of time with translation. you know that joomla had translated to 74 language that mean all of main words and terms have translate like (save,edit,permission ...) . so we can find the language the JCB installed in joomla and take the translated string and concat them with component name

This is a great idea, I will give it some thought and see if we can automate this, so as to grab the translated values from Joomla and dynamical translate all values that exist in the Joomla translation.

I will add this to the feature request!

This is a great idea, I will give it some thought and see if we can automate this, so as to grab the translated values from Joomla and dynamical translate all values that exist in the Joomla translation. I will add this to the feature request!

How I think it should be done

In the Language Translations area we add a new button, Auto Translate

This will then trigger a local search in the current installed languages for all components, plugins... well basically all files that is in the current system where JCB is installed and where it finds matching strings, it will try and detect if there are other languages with that placeholder and then get that translation and dynamically add it to the JCB translation area so it will be available on the next compilation.

This will be huge process specially if you like me have 20 000+ language strings in my system. So I am looking at options to speed-up the search, any idea you may have are welcome.

I do have a function with which I am able to hash 1million fields in the database in under 3 minutes, which actuality makes PHP run multi threading via curl_multi_exec.

The other way is to break the task up in smaller chunks and use cronjobs.

Reality is you will have to install all the Joomla languages you would like to be used and the more you install the greater the task will become, and that is where our challenge will be.

> How I think it should be done In the **Language Translations** area we add a new button, `Auto Translate` This will then trigger a local search in the current installed languages for all components, plugins... well basically all files that is in the current system where JCB is installed and where it finds matching strings, it will try and detect if there are other languages with that placeholder and then get that translation and dynamically add it to the JCB translation area so it will be available on the next compilation. This will be huge process specially if you like me have 20 000+ language strings in my system. So I am looking at options to speed-up the search, any idea you may have are welcome. I do have a function with which I am able to hash 1million fields in the database in under 3 minutes, which actuality makes PHP run multi threading via curl_multi_exec. The other way is to break the task up in smaller chunks and use cronjobs. Reality is you will have to install all the Joomla languages you would like to be used and the more you install the greater the task will become, and that is where our challenge will be.
bosyrih commented 2018-04-16 00:52:14 +00:00 (Migrated from github.com)

the translation come from Component Name, AdminViews Name (Single record, List of record), Fields that is the most importarnt of the job, and from SiteView and layouts and template,

the developer need to make component with one or tow language ( the main one En and the other one that must be installed in joomla),
and after complete the component he need to translate component to other languages, therefor no need to translate step by step for every language. just for second language.

if you can see in adminview the main things are permission, fields in Detaiels, publishing

My idea about that is:
1- determain the second langauge from joomla instaled language for our component to assign it to langauge file like ar-AA.{{componentName}}.ini.
2- placeholder in component name for tranlsated name.
3- in adminviews 2 placeholder for translated for (Single record, List of record),
4- for fields make a new placeholder for the translation for field name , description, hints, message.
5- for permissions we can take translated component name with the core translated from joomla by that language.

when we save or compile component thise information will put in language file .ini

this for backend .

the translation come from Component Name, AdminViews Name (Single record, List of record), Fields that is the most importarnt of the job, and from SiteView and layouts and template, the developer need to make component with one or tow language ( the main one En and the other one that must be installed in joomla), and after complete the component he need to translate component to other languages, therefor no need to translate step by step for every language. just for second language. if you can see in adminview the main things are permission, fields in Detaiels, publishing My idea about that is: 1- determain the second langauge from joomla instaled language for our component to assign it to langauge file like ar-AA.{{componentName}}.ini. 2- placeholder in component name for tranlsated name. 3- in adminviews 2 placeholder for translated for (Single record, List of record), 4- for fields make a new placeholder for the translation for field name , description, hints, message. 5- for permissions we can take translated component name with the core translated from joomla by that language. when we save or compile component thise information will put in language file .ini this for backend .
bosyrih commented 2018-04-16 00:55:33 +00:00 (Migrated from github.com)

I need to know what kind of translation you thought about , to be on the same concept.

I need to know what kind of translation you thought about , to be on the same concept.

We are not planning to change how JCB deals with translation. Since it already is a stunning implementation that works very well.

So here is the issue, once you have compiled your component there will be a number of strings added to the Language Translations area (in JCB). Next you can manually open every one of those strings and translate them, or you can export them into a spreadsheet that you can give to a translator, and then once they have translated it, you can import it again and so update the system in a bulk way. This way does not work with the placeholders at all so to insure that if you have translated any word (always starting from English) once, into lets say French, you never need to do it again in any other component and that word will automatically be available in French to all other component that use it.

So your suggestion was understood to help with the translation of common strings that Joomla has also already translated. Basically to safe your the time of translating a string into French, if Joomla has already got that word translated into French.

You will see in the last push to the staging branch I already started adding some improvements. Their now is a Build button in the Languages area to quickly get all of Joomla's languages (just the name and tag) pulled into JCB.

Next I will start working on the search and update function for the Language Translations area. This is where I am focused.

The way JCB during compilation builds the languages files and match the strings is already working very well and these two concepts should not happen at the same time, as it will clearly become to big to manage at once. So we should insure that JCB has the needed translation string for French or any other Language ready in place before compilation, and not try and achieve this during compilation.

We are not planning to change how JCB deals with translation. Since it already is a stunning implementation that works very well. So here is the issue, once you have compiled your component there will be a number of strings added to the **Language Translations** area (in JCB). Next you can manually open every one of those strings and translate them, or you can export them into a spreadsheet that you can give to a translator, and then once they have translated it, you can import it again and so update the system in a bulk way. This way does not work with the placeholders at all so to insure that if you have translated any word (always starting from English) once, into lets say French, you never need to do it again in any other component and that word will automatically be available in French to all other component that use it. So your suggestion was understood to help with the translation of common strings that Joomla has also already translated. Basically to safe your the time of translating a string into French, if Joomla has already got that word translated into French. You will see in the last push to the staging branch I already started adding some improvements. Their now is a **Build** button in the **Languages** area to quickly get all of Joomla's languages (just the name and tag) pulled into JCB. Next I will start working on the search and update function for the **Language Translations** area. This is where I am focused. The way JCB during compilation builds the languages files and match the strings is already working very well and these two concepts should not happen at the same time, as it will clearly become to big to manage at once. So we should insure that JCB has the needed translation string for French or any other Language ready in place before compilation, and not try and achieve this during compilation.
bosyrih commented 2018-04-16 09:41:54 +00:00 (Migrated from github.com)

I'm talking about a quick translation of the interface so that the developer gets a quickly translated interface, but for full translation, which includes messages and others that do not appear on the user interface directly, the translation process is difficult and complex. But in Joomla we use the translation by Crowdin where the files are uploaded to be translated and then we translate the texts based on the proportion of similarities, where you give the proposed translation through the translations available to him and give you similarity, I had translated a large proportion of the Joomla site into Arabic in many components And elements like
Joomla! 3.x series landing pages
Joomla! Marketing Visuals
Joomla! Official Template & Extras......

I'm talking about a quick translation of the interface so that the developer gets a quickly translated interface, but for full translation, which includes messages and others that do not appear on the user interface directly, the translation process is difficult and complex. But in Joomla we use the translation by Crowdin where the files are uploaded to be translated and then we translate the texts based on the proportion of similarities, where you give the proposed translation through the translations available to him and give you similarity, I had translated a large proportion of the Joomla site into Arabic in many components And elements like Joomla! 3.x series landing pages Joomla! Marketing Visuals Joomla! Official Template & Extras......

Well this makes me think.... lets build a bridge between Crowdin and JCB so you could use their API right in JCB. I am looking into this....

Well this makes me think.... lets build a bridge between Crowdin and JCB so you could use their API right in JCB. I am looking into this....

About splitting the translations into interface translation and full will not work at this time, the compiler does not have that option... and to build it will not be easy. I mean to get it to do all the language strings and manage all that is a huge task, and it all happens during compilation.

I am going to start expanding JCB with Crowdin since JCB is clearly a open-source project that should qualify for a free account. This will give me the perspective to automate this process more.

About splitting the translations into **interface** translation and **full** will not work at this time, the compiler does not have that option... and to build it will not be easy. I mean to get it to do all the language strings and manage all that is a huge task, and it all happens during compilation. I am going to start expanding JCB with Crowdin since JCB is clearly a open-source project that should qualify for a free account. This will give me the perspective to automate this process more.

https://crowdin.com/project/joomla-component-builder this is the official approved open-source account.

https://crowdin.com/project/joomla-component-builder this is the official approved open-source account.

Please join that project and I can add you to he Arabic translation. If you would like to help.

Please join that project and I can add you to he Arabic translation. If you would like to help.
bosyrih commented 2018-04-16 21:53:55 +00:00 (Migrated from github.com)

I had request to join but confirmation did not come to me yet,

I had request to join but confirmation did not come to me yet,
bosyrih commented 2018-04-18 12:50:52 +00:00 (Migrated from github.com)

that's great job .

that's great job .

There are a few language strings with html and JavaScript in them. You should try to keep it as close as you can to the English in the code side, and only have it translate the actual text. I see it gets little mixed up with those.

There are a few language strings with html and JavaScript in them. You should try to keep it as close as you can to the English in the code side, and only have it translate the actual text. I see it gets little mixed up with those.
Sign in to join this conversation.
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: joomla/Component-Builder#261
No description provided.