Jump to content

(NE) Translate


Nathan Explosion
 Share

Recommended Posts

This resource is not yet in the MarketPlace...so calm down!! 😉 I am writing this up now for the eventual release...

  1. Here's what it does do...
    • Shows a 'Translate' link/menu below the content in Forum/Calendar/Pages* (support for other applications may be added depending on popularity of this application)
      • * "Pages" will require a manual action by the admin to add something to the 'Display' template(s) for their database.
    • Uses Google's Cloud Translation REST API (Basic) or DeepL's Translator API
    • You, the Admin, can choose from the list of the API's supported languages and make those available to the user for use (would be a good idea - Google supports approximately 100 target languages while DeepL currently supports 28 target languages
      • If you choose to display one language for use, then a single link is available to the user
      • But if you choose more than one language then a menu will appear listing the configured available languages.
    • You can also choose who can see the translate option.
    • When a language is selected, the content will be sent to the configured API using REST, translated and returned.
    • The returned translation will be processed and the content will be replaced.
      • Additionally, each translation is stored in the database so that further translation requests for the same content are pulled from there instead of being translated via the API.
        • If the original content is edited then any translations stored in the database will be discarded, ensuring that any further translation requests do not provide an out-of-date translation, and always translate the current content.
      • Functionality exists to allow you to view the translations in the ACP and refine the translation if you so wish.
      • Translations can be 'protected' so that the editing action above doesn't discard the translation - useful if you have refined the translation and wish to retain that refinement
        • In this case, if an edit is performed then a clear indication will be displayed in the ACP advising that the translation is out-of-date due to the original content being edited.
    • The user can revert to the original content at any time by clicking a link to do so.
    • Usage logs are available in the ACP for each translation request, so you can see basic information about requests made from your site out to the APIs (both of which have their own console available which provides detailed usage information), along with requests made to content saved in the database.
  2. Here's what it doesn't do...
    • It does not translate your entire site at the flick of a switch.
    • Translation of content at the time of display, as opposed to a user choice
      • Why? Translation is performed via a REST API request - each item of content in a topic, for example, would need to be sent to the API. In a topic with multiple posts then this will mean up to 25 REST API requests being performed to display each page of the topic. That is going to result in a performance hit, and is not something I am willing to put in place at this time.
      • Will it be a future feature? Maybe, but no promises.

 

 

Edited by Nathan Explosion
Link to comment
Share on other sites

v1.1.0 of the application is now pending approval on the Marketplace.

A pre-Xmas sale price of $25 ($10 yearly renewal) is in effect, which is 50% off the price of the application. This special price offer will end on 1st January 2022, at which point it will revert to $50 ($20 renewal)

IMPORTANT: this was developed against the default IPS theme. If you purchase this application and have a custom theme which results in the template hooks not working then there will be manual steps required to put things in place - instructions can be provided on how to do this, if it is deemed necessary.

Edited by Nathan Explosion
Link to comment
Share on other sites

  • 2 weeks later...

So, the feedback on the rejection was related to how cache was being used and mainly around the fact that running the support tool will clear that cache (to be expected)

So, with that in mind, I'm going all-in on storing the translations in the database instead. And with that, I'm going to build in some functionality that will allow you to refine the API-provided translations by editing them in the ACP (if that is something you wish to do) - I have a few ideas around how that is done, which I am working on over the next few days.

Once done, it will be v1.2.0 that will be the version release - and I'll update here once it is released, along with the 'sale' details that will be in place initially. 

 

Link to comment
Share on other sites

Let us know asap when will be available for purchase. On the side I must say that is a great job you are doing. Hope you keep yourself and family safe in this pandemic situation.... 

On 1/1/2022 at 6:04 PM, Nathan Explosion said:

translations in the database instead. And with that, I'm going to build in some functionality that will allow you to refine the API-provided translations by editing them in the ACP (if that is something you wish to do)

If that will not make the application to"heavy" it will be a great addition 

 

Link to comment
Share on other sites

I was going through my forum today and then I realised if I will apply translation to the post, then every answer/comment will be translated separately….it’s any chance that you can translate the whole topic in to certain languages?

For example if I have few answers in Polish, then English and German, it will be easier to apply the “total topic translation “ as an option?

Link to comment
Share on other sites

@Edjazoli - sorry, but this is the support topic for the resource..I don't use PM as first point of contact.

Quote

I just obtained my API key and after adding to the settings I've got this error...any ideas and advices?

Thx.

 

"A configuration or server error has occurred" when accessing 'netranserrors' controller in ACP.

Easy fix - it's just a typo.

Quote

image.thumb.png.3db68c330ce8218311d18d5bf2060b6c.pngimage.thumb.png.3db68c330ce8218311d18d5bf2060b6c.png

 

Interesting - will do a brand new install on my test site, see if it fails for me too and go from there.

Edited by Nathan Explosion
Link to comment
Share on other sites

So I generate another key but this time I use Enter key instead of SAVE and works. Everything works perfectly, however I'd like to add few things:

  • Show translation option for topic's first post- it will be handy if you could connect title and first topic as one translation. I think it will help the users to understand better topic etc.
  • In the list of  language choices is not possible to select more than one language( or maybe its only Safari issue)- however on the iPhone its not a problem.

Thank you again for quick reply.

 

Link to comment
Share on other sites

v1.2.1 has been submitted for approval

  • New
    • added setting to allow easy switch of DeepL plan being used, to force use of different API endpoints
  • Fixes
    • fixed issue with 'Errors' page in ACP not opening due to a typo in the code
  • Changes
    • hard-coded "Translate" in HTML template changed to a language string
    • Removed redundant .css call from HTML template
    • Renamed .js file to remove an informational message from developer console (message may be construed as an error when it isn't actually an issue)
2 minutes ago, Edjazoli said:

Show translation option for topic's first post- it will be handy if you could connect title and first topic as one translation. I think it will help the users to understand better topic etc.

Will have a think about that one.

2 minutes ago, Edjazoli said:

In the list of  language choices is not possible to select more than one language( or maybe its only Safari issue)- however on the iPhone its not a problem.

Not something that I can control - I'm using the IPS form helper to generate the select box for the Languages, which makes it their code and not mine. I will say that Safari on Mac is a pain in the proverbials though.

Edited by Nathan Explosion
Link to comment
Share on other sites

17 minutes ago, Nathan Explosion said:

Changes

  • hard-coded "Translate" in HTML template changed to a language string

Happy Daniel Bryan GIF by WWE

Maybe even in the future a link position

  • Button before post controls
  • Before post controls
  • After post controls
  • Before member name
  • After member name
  •  
Link to comment
Share on other sites

1 hour ago, Nathan Explosion said:
1 hour ago, Edjazoli said:

Show translation option for topic's first post- it will be handy if you could connect title and first topic as one translation. I think it will help the users to understand better topic etc.

Will have a think about that one.

This one will be included in the next release after v1.2.1

Link to comment
Share on other sites

On 1/9/2022 at 10:37 AM, Nathan Explosion said:
On 1/8/2022 at 8:24 PM, Edjazoli said:

it’s any chance that you can translate the whole topic in to certain languages?

Maybe at a later point - I would like to concentrate on getting the initial release out first, and see if it is worth my time adding additional functionality outside of the original intended design.

This one will be included in the next release after v1.2.1, with the following caveats:

  • specifically for Forums only
  • specifically for only the visible comments - each comment to be translated will use 1 API call, and if I send everything from a topic containing 767 comments then you might as well go put the kettle on...twice.
4 hours ago, Nathan Explosion said:

v1.2.1 has been submitted for approval

And is now available.

Edited by Nathan Explosion
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...