mtasa-resources icon indicating copy to clipboard operation
mtasa-resources copied to clipboard

Lang support for editor resource

Open fresholia opened this issue 5 years ago • 7 comments

By editing JSON files, members of country communities can easily integrate systems into their own languages. The resource is still under development.

Do not translate placeholders like %s, they will be auto-replaced by the script.

Like this:

JSON:

"TRANSLATE_TXT": "result is: %s"

Lua:

exports.editor_lang:_("TRANSLATE_TXT"):format("aaa")
-- print result is: aaa

fresholia avatar Jan 25 '21 19:01 fresholia

I don't think using a separate resource for editor translations and JSON files is an ideal implementation. We should make use of the existing infrastructure at https://translate.mtasa.com/ which is based on the GNU gettext standard.

jlillis avatar Jan 25 '21 20:01 jlillis

I think the cleaner way is to add a generic translation resource, which accepts standard .po files via exports and then offers a translation service back. That way it'd also be useful for other non-default resources.

sbx320 avatar Jan 25 '21 22:01 sbx320

I don't think using a separate resource for editor translations and JSON files is an ideal implementation. We should make use of the existing infrastructure at https://translate.mtasa.com/ which is based on the GNU gettext standard.

I wouldn't trust translate.mtasa.com on this, seeing how bad some Turkish translations were done

turret001 avatar Jan 26 '21 10:01 turret001

I think the cleaner way is to add a generic translation resource, which accepts standard .po files via exports and then offers a translation service back. That way it'd also be useful for other non-default resources.

It would make sense to make a single language resource for all resources, but we should do this with JSON.

fresholia avatar Jan 26 '21 10:01 fresholia

I don't think using a separate resource for editor translations and JSON files is an ideal implementation. We should make use of the existing infrastructure at https://translate.mtasa.com/ which is based on the GNU gettext standard.

I wouldn't trust translate.mtasa.com on this, seeing how bad some Turkish translations were done

You can always review and suggest the translations there.

xLive avatar Jan 26 '21 10:01 xLive