[CDB] gTranslate

A place for Extension Authors to post and receive feedback on Extensions still in development. No Extensions within this forum should be used within a live environment!
Anti-Spam Guide
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: Extensions Development rules

IMPORTANT FOR NEEDED EVENTS!!!
If you need an event for your extension please read this for the steps to follow to request the event(s)
User avatar
stone23
Registered User
Posts: 177
Joined: Sat Nov 02, 2019 4:44 pm
Location: France

Re: [3.3][RC] gTranslate

Post by stone23 »

HiFiKabin wrote: Sat Jul 08, 2023 8:06 pm download and unzip the attached, uploading it to:-

ext/chris1278/jsclock/styles/prosilver/template/event/

replacing the original file and purge the boards cache

(I have wrapped the notranslate span around the code that needs to be ignored by the translate script)
Thanks, it works. :P
encreuse.net
Forum version : 3.3.11
php version : 8.2.10

Excuse my English, I'm French...
User avatar
HiFiKabin
Community Team Member
Community Team Member
Posts: 6767
Joined: Wed May 14, 2014 9:10 am
Location: Swearing at the PC, UK
Name: James

Re: [3.3][RC] gTranslate

Post by HiFiKabin »

stone23 wrote: Sun Jul 09, 2023 4:12 pm
HiFiKabin wrote: Sat Jul 08, 2023 8:06 pm download and unzip the attached, uploading it to:-

ext/chris1278/jsclock/styles/prosilver/template/event/

replacing the original file and purge the boards cache

(I have wrapped the notranslate span around the code that needs to be ignored by the translate script)
Thanks, it works. :P
No Problem
User avatar
Miri4ever
Registered User
Posts: 608
Joined: Sat Mar 07, 2015 11:18 am

Re: [3.3][RC] gTranslate

Post by Miri4ever »

I found this solution for the problem now, I am satisfied with:

Use 3.30 RC3 Version and use the style files from 3.31 RC1

And then add this code from the old 3.30 RC to the new style:

Code: Select all

      "default_language":"{{ TRANSLATE_DEFAULT_LANG |escape('js') }}",
Now anybody can select his home language for the translator and this home language is not anymore translated. So your page's default language cannot be translated, and you can use several languages. But you need to old setup acp things back.

And if those BBCodes should be created we definitely need also an installer inside the extension.
Homepage: Terra Oceanica

Extension Developments:
PHPBB Games Solitaire, MChat Poker, MChat Black Jack, MChat Cards, MChat Trivia
PHPBB Special Effects, Mousepointers, X-Mas Themes and Designs for PBWoW Style.
Supported work: (**New Updated** UCP Sidebar), Tables, Hide, PBWow3 Style
User avatar
Chico Gois
Translator
Posts: 91
Joined: Tue Mar 28, 2006 4:42 am
Location: São Paulo - Brasil

Re: [3.3][RC] gTranslate

Post by Chico Gois »

Or what languages do you want to appear

Code: Select all

"languages":["en","fr","de","ja","nl","it"],
User avatar
Miri4ever
Registered User
Posts: 608
Joined: Sat Mar 07, 2015 11:18 am

Re: [3.3][RC] gTranslate

Post by Miri4ever »

Possible but it's not the users' work to modify files on its own just to switch settings. So, this solution from a mix of old and new code is for now the best situation until we find our own way to add a no translate field with JS code. And nobody needs to translate its page with the origin language.
Homepage: Terra Oceanica

Extension Developments:
PHPBB Games Solitaire, MChat Poker, MChat Black Jack, MChat Cards, MChat Trivia
PHPBB Special Effects, Mousepointers, X-Mas Themes and Designs for PBWoW Style.
Supported work: (**New Updated** UCP Sidebar), Tables, Hide, PBWow3 Style
User avatar
Mick
Support Team Member
Support Team Member
Posts: 26828
Joined: Fri Aug 29, 2008 9:49 am

Re: [3.3][RC] gTranslate

Post by Mick »

Miri4ever wrote: Sun Jul 09, 2023 9:10 pmUse 3.30 RC3 Version and use the style files from 3.31 RC1
Presumably you mean versions 3.3.0_RC3 and 3.3.1_RC1 etc?
  • "The more connected we get the more alone we become” - Kyle Broflovski© 🇬🇧
SeewolfPK
Registered User
Posts: 112
Joined: Sat Apr 09, 2011 10:18 am

Re: [3.3][RC] gTranslate

Post by SeewolfPK »

A request:
If changes are announced here, please indicate in which file exactly the changes should be made.
Best wishes
Paul
User avatar
HiFiKabin
Community Team Member
Community Team Member
Posts: 6767
Joined: Wed May 14, 2014 9:10 am
Location: Swearing at the PC, UK
Name: James

Re: [3.3][RC] gTranslate

Post by HiFiKabin »

Miri4ever wrote: Sun Jul 09, 2023 9:10 pm Now anybody can select his home language for the translator and this home language is not anymore translated. So your page's default language cannot be translated, and you can use several languages. But you need to old setup acp things back.
Correct, but then not all posts will be translated. I built the current version to solve that more important issue.
Miri4ever wrote: Sun Jul 09, 2023 9:10 pm And if those BBCodes should be created we definitely need also an installer inside the extension.
What BBCodes? If you the notranslate BBCode then that is not needed for the extensions correct operation but can be added is the board owner wishes (just like any other BBCode)
Miri4ever wrote: Sun Jul 09, 2023 9:46 pm find our own way to add a no translate field with JS code
As I have said before, I totally agree but unless gTranslate are willing to alter their code (and remember the code is not just for this extension) then it will not happen.
Chico Gois wrote: Sun Jul 09, 2023 9:13 pm Or what languages do you want to appear

Code: Select all

"languages":["en","fr","de","ja","nl","it"],
That is the only way thus far that you can limit the number of languages available for translation, however as it requires the extension file to be edited it would not pass validation
User avatar
warmweer
Jr. Extension Validator
Posts: 11651
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Bel ... gium

Re: [3.3][RC] gTranslate

Post by warmweer »

HiFiKabin wrote: Mon Jul 10, 2023 8:46 am

Code: Select all

"languages":["en","fr","de","ja","nl","it"],
That is the only way thus far that you can limit the number of languages available for translation, however as it requires the extension file to be edited it would not pass validation
Perhaps a configuration setting in which languages can be ticked or just entered (limiting the translation to those languages)?
However, the point of the extension is to provide translated pages. Some actions shouldn't really be available in translated mode: e.g. editing, deleting, posting/quoting?).

Personally I wouldn't try to fix the visual glitches too much as the widget may change in the future, and I know of another widget (different company) being developed, which (if it is better that the one used at this time) may render the current widget outdated.
Spelling is freeware, which means you can use it for free.
On the other hand, it is not open source, which means you cannot change it or publish it in a modified form.


Time flies like an arrow, but fruit flies like a banana.
User avatar
Chico Gois
Translator
Posts: 91
Joined: Tue Mar 28, 2006 4:42 am
Location: São Paulo - Brasil

Re: [3.3][RC] gTranslate

Post by Chico Gois »

warmweer wrote: Mon Jul 10, 2023 10:25 am Personally I wouldn't try to fix the visual glitches too much as the widget may change in the future, and I know of another widget (different company) being developed, which (if it is better that the one used at this time) may render the current widget outdated.
In general, this extension is a good example not only of exercising the imagination but also of learning.
User avatar
warmweer
Jr. Extension Validator
Posts: 11651
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Bel ... gium

Re: [3.3][RC] gTranslate

Post by warmweer »

Chico Gois wrote: Mon Jul 10, 2023 10:36 am ...
In general, this extension is a good example not only of exercising the imagination but also of learning.
Agreed but there has to be a cut-off point somewhere.
Spelling is freeware, which means you can use it for free.
On the other hand, it is not open source, which means you cannot change it or publish it in a modified form.


Time flies like an arrow, but fruit flies like a banana.
User avatar
Miri4ever
Registered User
Posts: 608
Joined: Sat Mar 07, 2015 11:18 am

Re: [3.3][RC] gTranslate

Post by Miri4ever »

No I was talking about 3.3.0 RC3 and 3.3.1 RC1 as I wrote.

I just did a quick test with mine to translate the page and topic to whatever language. As far I can tell, anything is translated as those not translated you concern about were inside the JS Code from 3.3.0 RC3, and they made some updates with the browser detected and further refinements since 3.3.1 RC1.

So doing this mix I created with set up the translator to board language by default seems to do an impressive job and not break any moderating features, any design, any extensions and usernames so far. Sure, translated pages look horrible with many extensions and texts outside buttons, but most will only use for a special text to get translated. And for the good translations we can still use the SIMPLE TRANSLATE Plugin with even better doing as Google ever can do.

I just did a brief look at the base JS Code and as we can adjust colors, and browser detect. I think it's also possible to create a variable for inserting a no translate flag, into this country list, via HTML / JS inside the extension itself. The same way we change colors.

And it even should not do auto-translate by its own if there is no request. This seems to work for now with the old code, the new style code from the latest release, plus this one code line I added from the old styles. It would be the same fun thing a car would start driving on its own without a driver, just because it's a car.

Yeah, sure I know about those BB Codes must be added on the own. But then we're coming back to question why people need to modify things inside and for to run extensions on their own. I think this was my intention behind these questions.

I am excited to see if there are better solutions in the future as the old google if there much better translations plugins exist inside browsers, that possible could be adapted in future time. I may play a bit with the code to see if a custom flag could be added, but how to change this text from the base language setup inside ACP menu.
Homepage: Terra Oceanica

Extension Developments:
PHPBB Games Solitaire, MChat Poker, MChat Black Jack, MChat Cards, MChat Trivia
PHPBB Special Effects, Mousepointers, X-Mas Themes and Designs for PBWoW Style.
Supported work: (**New Updated** UCP Sidebar), Tables, Hide, PBWow3 Style
User avatar
Mick
Support Team Member
Support Team Member
Posts: 26828
Joined: Fri Aug 29, 2008 9:49 am

Re: [3.3][RC] gTranslate

Post by Mick »

Miri4ever wrote: Mon Jul 10, 2023 6:29 pm No I was talking about 3.3.0 RC3 and 3.3.1 RC1 as I wrote.
Sorry,I wasn’t clear, you said:
Miri4ever wrote: Sun Jul 09, 2023 9:10 pmUse 3.30 RC3 Version and use the style files from 3.31 RC1
What I meant was versions 3.30 and 3.31 don’t exist, they are 3.3.0 and 3.3.1.
  • "The more connected we get the more alone we become” - Kyle Broflovski© 🇬🇧
User avatar
HiFiKabin
Community Team Member
Community Team Member
Posts: 6767
Joined: Wed May 14, 2014 9:10 am
Location: Swearing at the PC, UK
Name: James

Re: [3.3][RC] gTranslate

Post by HiFiKabin »

Miri4ever wrote: Mon Jul 10, 2023 6:29 pm And for the good translations we can still use the SIMPLE TRANSLATE Plugin with even better doing as Google ever can do.
What simple translate plug in? I can not find anything of this name in the CDB
Miri4ever wrote: Mon Jul 10, 2023 6:29 pm But then we're coming back to question why people need to modify things
There is no NEED for the BBCode to be added, no more than the need for a spoiler or strike through code. It is an option should the boards admin require it

I am glad that you are happy with the solution you have come up with that suits your purpose. That is the beauty of Open Source. Anyone can make any changes they wish, and release it for others if they so wish.
SeewolfPK
Registered User
Posts: 112
Joined: Sat Apr 09, 2011 10:18 am

Re: [3.3][RC] gTranslate

Post by SeewolfPK »

How can I prevent the username from being translated?
Best wishes
Paul

Return to “Extensions in Development”