Add-on types

How it works? Why if I translate add-on and set type of translate as language
(<em:type>8</em:type>) - it’s don’t give a result (my chrome.manifest is correct, it’s override only add-on content (e.g. overlay chrome://my_addon/content/overlay.xul chrome://my_addon_ru/content/overlay.xul) ), but if I set type of translate as extension (<em:type>2</em:type>) - it’s works! What changes between language and extension type? I need to have chrome.p.manifest if I set type “language” or “extension”?

Can you define “works”?

We currently do not have a UI for localization, so installing an addon of this type would go pretty much unnoticed UI-wise. Installing a language would just make it “available”, you would still have to set it.

@toddw can you chime in? How does one set a language atm in Komodo?

Okay. For example I have my_addon/content/overlay.xul in English language (let’s imagine it’s a simple item in Tools menu) and I override this by another add-on contains same xul but in Russian language (or contains a new xul with Mozilla language system (&blablabla.blablabla)) and if my type of add-on is language - override not working. If extension - working.
I hope I’m define “works”. Wait for @toddw answer.

Well, the correct way to add localization is through DTD files and adding a entry into the chrome manifest of the language add-on:

locale komodo ru-RU locale/ru

then you need to switch the locale preference from within Komodo to change language strings (there is a mozilla preference general.useragent.locale for controlling the locale):
https://addons.mozilla.org/en-US/firefox/addon/locale-switcher/

But if I want translate only add-on? Changing locale settings for Komodo change Komodo language, not only for add-on…
Anyway I think, If I edit content/*- I’m changing not only strings in *.dtd files (and automatically change my type from language to extension, because language don’t must create/remove new items in UI), so here is all normal. But what the add-on ordering? Languages loading after all extensions loaded?
Also I think I can speak about language changing with @Laborpago when we translate Komodo.

Я не понимаю, что ты хочешь сделать :slight_smile: Я уже говорил, что лучший способ - это перевести дополнение (если оно от третьих лиц) и установить уже переведённое дополнение, вместо оригинального. Тогда и проблем никаких не будет.

I do not understand what you want to do :slight_smile: I have already said that the best way - is to translate add-on (if it is from a third party) and install the translated add-on, instead of the original. Then the problem will not be any.

Lol. And what I must type in “Author”? Myself? Nope, I can’t. I don’t create add-on, I’m just translate it :smile:
But for now I’m interesting in add-ons loading order.

А зачем писать себя в авторах? В описании можно написать, что переведено тобой. В ином случае используй систему перевода мозилы. Переключай локаль. Однако тогда ты должен будешь и сам комодо таким же образом перевести. А мой способ не подходит для этих целей.

And why write the authors themselves in? In the description, you can write what you translated. Otherwise, use the translation system mozilla. Switch to the locale. But then you’ll have to Komodo itself in the same way to translate. And my method is not suitable for this purpose.

If I change locale - I must translate not only Komodo UI… I must translate all addons placed in $USER/.komodoide/[version]/XRE/extensions/ :smiley:

см. выше see post above

I read and I know!

This is definitely -not- the best way, this is the easiest way that you’ve found, but there are some serious drawbacks with that and I would not recommend this.

I’ll try and find some time next week to document the process of properly translating Komodo and Komodo addons.

1 Like

In some cases add-on developers don’t create/support Mozilla translation system (no dtd files, no locale folder, no &dtdkeyinstead of simple text) and it’s create a lot of problems for translator (for example: Emmet doesn’t support Mozilla translation by default). In this case I can set type for add-on to extension, because it’s edit XUL files of another add-on. In other cases I should use language type for my add-on if it doesn’t edit any XUL files.
I’ll try find some time next week to read document by Naatan, if he create it.

“not the” best way - ok. “simple” way - ok. вот заладил одно и то же. где он был раньше со своим документом… no offense, Nathan : - )

He’s work on Komodo like another Komodo developers. :blush: