Nuix / Language-Translation-Integration

A script which integrates with third-party translation services like Google Cloud Translation or Microsoft Cognitive Services, providing a way to translate text of items in a Nuix case
Apache License 2.0
1 stars 1 forks source link

Suggested update of languages #5

Closed BSDVTUX closed 1 year ago

BSDVTUX commented 1 year ago

Not so much an issue as a suggested update to the code to list supported languages (as of Jan 2023) alphabetical with Auto language detect included as an option (and English near the top as preference).

https://github.com/Nuix/Language-Translation-Integration/blob/140049848ad7ced6441357ff503edcba4a411f74/Ruby/translation.nuixscript/Translators/libre_translate.rb#L13

LANGUAGES = { 'auto' => 'Auto', 'en' => 'English', 'sq' => 'Albanian', 'ar' => 'Arabic', 'az' => 'Azerbaijani', 'zh' => 'Chinese', 'cs' => 'Czech', 'da' => 'Danish', 'nl' => 'Dutch', 'eo' => 'Esperanto', 'fi' => 'Finnish', 'fr' => 'French', 'gl' => 'Galician', 'de' => 'German', 'el' => 'Greek', 'he' => 'Hebrew', 'hi' => 'Hindi', 'hu' => 'Hungarian', 'id' => 'Indonesian', 'ga' => 'Irish', 'it' => 'Italian', 'ja' => 'Japanese', 'kab' => 'Kabyle', 'ko' => 'Korean', 'nb' => 'Norwegian Bokmål', 'oc' => 'Occitan', 'fa' => 'Persian', 'pl' => 'Polish', 'pt' => 'Portuguese', 'ru' => 'Russian', 'sk' => 'Slovak', 'es' => 'Spanish', 'sv' => 'Swedish', 'zgh' => 'Tamazight-Standard Moroccan', 'tr' => 'Turkish', 'uk' => 'Ukrainian', 'vi' => 'Vietnamese' }.freeze

While there may be reason to not do so on large data sets due to delays, I found removing the ".freeze" enabled the "Auto" selection to identify different languages in files and translate as encountered.

JuicyDragon commented 1 year ago

Hello @BSDVTUX I wanted to let you know I have seen this and I have been meaning to follow up, but other things keep coming up for me. The change is fairly straightforward and sensical in my mind so I believe I will just go ahead and include your change when I get a chance 😄

BSDVTUX commented 1 year ago

If we had time to do everything, there would be nothing to do. I just try to be helpful to the next person as so many have been to me.

Have a blessed week.

On Mon, Feb 13, 2023, 7:55 PM Jason Wells @.***> wrote:

Hello @BSDVTUX https://github.com/BSDVTUX I wanted to let you know I have seen this and I have been meaning to follow up, but other things keep coming up for me. The change is fairly straightforward and sensical in my mind so I believe I will just go ahead and include your change when I get a chance 😄

— Reply to this email directly, view it on GitHub https://github.com/Nuix/Language-Translation-Integration/issues/5#issuecomment-1428934227, or unsubscribe https://github.com/notifications/unsubscribe-auth/A5SPMMUK2EG7LS4VVZGBBH3WXLJY5ANCNFSM6AAAAAAUMNR4CQ . You are receiving this because you were mentioned.Message ID: @.***>