Page 1 of 1

Localization of plugins

PostPosted: Thu Jan 07, 2016 10:51 pm
by anton
Good afternoon. Please tell me whether it is possible to localize the description of the commands in the plug-ins?

Re: Localization of plugins

PostPosted: Thu Jan 07, 2016 11:06 pm
by HPW
Hello,

Seems not, I see no options for that in current plugin-Generator.
But maybe there is a similar conzept like in NeoAppBuilder with a language-file. If present it is used instead of org. definitions.
Just a guess. Dave will tell us.

Regards

Re: Localization of plugins

PostPosted: Fri Jan 08, 2016 12:11 am
by mishem
Локализация PlugInGenerator, или описание команд готовых плагинов?

Если команд плагинов, то открывай в PlugInGenerator и переводи. :)

Если нужна локализация PlugInGenerator, то могу скинуть перевод, но думаю пока рано его выкладывать. Да и переводить пока в принципе там нечего.

Re: Localization of plugins

PostPosted: Fri Jan 08, 2016 12:31 am
by anton
mishem wrote:Локализация PlugInGenerator, или описание команд готовых плагинов?
Если команд плагинов, то открывай в PlugInGenerator и переводи. :)

Так PlugInGenerator не открывает по моему скомпилированные плагины... Он же с исходниками только работает. Свои плагины я понятно без проблем зарусю... вернее изначально русскими будут.
А вот с скомпиленными беда, мне пока не удалось нечем достучаться до них.
Если нужна локализация PlugInGenerator, то могу скинуть перевод, но думаю пока рано его выкладывать. Да и переводить пока в принципе там нечего.

Да не то чтобы нужна, там и так все понятно... но наверно на сайте стоит обновить русик, лишнем не будет. :)
Seems not, I see no options for that in current plugin-Generator.
But maybe there is a similar conzept like in NeoAppBuilder with a language-file. If present it is used instead of org. definitions.
Just a guess. Dave will tell us.

Thank you. Let's see what Dave says.

Re: Localization of plugins

PostPosted: Mon Jan 11, 2016 8:28 pm
by Neosoft Support
I hadn't really thought about a method for translating plug-ins. I'd rather not over complicate the plugin generator's interface, but I'm open to suggestions on how multi-lingual plugins might be implemented. (Unfortunately, I don't speak Russian.)

Re: Localization of plugins

PostPosted: Tue Jan 12, 2016 11:08 pm
by mishem
There are two options.
1. The authors lay out the source plug-ins. But I guess not everyone would agree.
2. pull out of the plug-string resources. However, this option can be complicated.

Well We must translate not only hints and description, for example in:

Code: Select all
function dtDayNumToName( num ) {
  var days = ["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];
  return days[num];
}


We need to translate this array.

"Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"

Or make unpacking \ packer plugin.

(Unfortunately, I don't speak Russian.)

I thought that PlugInGenerator can do the translation.

Re: Localization of plugins

PostPosted: Wed Jan 13, 2016 1:58 am
by luishp
Code: Select all
function dtDayNumToName( num,lang) {
  if(lang=="en" || lang==""){
     var days = ["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];
  }else if(lang=="es"){
     var days = ["Domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sábado"];
  }else{
     console.log("dtDayNumToName Error: Unsupported language");
  }
     return days[num];
}

Re: Localization of plugins

PostPosted: Wed Jan 13, 2016 2:20 am
by mishem
As the source code to make it clear. We are talking about the compiled plugin.
In general, I think that needs unpacking. Over time, the plug-ins will be many, and from unknown authors. What happens inside is not known. But the responsibility falls to the developer program.
With extractor, you can always see what is added to the program.
In interenete quite ready functions. So I do not think that someone will be engaged in theft and copyright assignment itself.

Как в исходном коде сделать, это понятно. Мы говорим о скомпилированном плагине.
Вообще я думаю что нужен распаковщик. Со временем плагинов появится много, и от не известных авторов. Что будет внутри, не известно. А ответственность будет ложится на разработчика программы.
Имея распаковщик, можно всегда посмотреть что именно добавляется в программу.
В интеренете достаточно готовых функций. Так что я не думаю что кто то будет заниматься воровством и присваиванием себе авторских прав.

Re: Localization of plugins

PostPosted: Wed Jan 13, 2016 4:38 am
by HPW
After a look at the neoAppBuilder language files I would think about an option modelled with this in mind:

The Plugin directory gets a subfolder \language like in neoappbuilder
The format of the language files are the same as in neoappbuilder.
Filenames also English.lang, German.lang , Russian.lang etc.

Code: Select all
TargetApplication=DateTime Plugin
Author=NeoSoft Corp.
SourceLANGID=1033
LANGID=1031
Generator=NeoAppBuilder Language Editor v15.12.19
LastModified=12/24/2015 3:44:03 PM

[About]
00000001=Über
...


In Plugingenerator a plugin Author can write all Descriptions-fields either in clear native language or he can use a placeholder string with resource-id like:

Native insert string:
Code: Select all
Über


Resource-id as insert string
Code: Select all
[About]00000001


When a placeholder is used a second field could display the string fould in the language file.

When the plugingenerator compiles such plugin all language files gets compiled into the plugin.
Then a user of a plugin choose his interface language in neoAppBuilder and this is used to read the description from the internal language-ini.

The language editor should be able to read/write any language file (not only for neoAppbuilder).
This way an plugin-author can provide support for different languages.
He could send his native language file to a user interested in a translation and the user translate it and send it back to compile.
For translations in code I like Luish suggestion. We would need access to the global language variable of neoAppBuilder.

Regards