X
Tippen Sie hierhin, um die Version dieser Website für Mobilgeräte aufzurufen.

Hilfeforum

dictionary add-on and webextension

Veröffentlicht

Hello everybody. I've justed ported my dictionary add-on with the new WebExtension and I'm facing a problem. In the old format (install.rdf) I can specify different name and description for each language, like this:

< em:localized > < Description > < em:locale >en< /em:locale > < em:name >name< /em:name > < em:description >description< /em:description > < /Description > < Description > < em:locale >it< /em:locale > < em:name >nome< /em:name > < em:description >descrizione< /em:description > < /Description > ...

Now (manifest.json) I see there is only one pair of name-discription, like this:

{

  "name": "name",
  "description": "description",

...

The problem is that I didn't find a way to specify the name-description pair for other languages. Trying

{

  "name": "__MSG_extensionName__",
  "description": "__MSG_extensionDescription__",
  "default_locale": "it",

... with the usual locales structure (_locales/{lang}/manifest.json) { "application_title": { "message": "name" }, "application_description": { "message": "description" } }

didn't work because when I upload my extension the AMO complains about non valid tag "default_locale". What am I doing wrong? Thank you

Hello everybody. I've justed ported my dictionary add-on with the new WebExtension and I'm facing a problem. In the old format (install.rdf) I can specify different name and description for each language, like this: < em:localized > < Description > < em:locale >en< /em:locale > < em:name >name< /em:name > < em:description >description< /em:description > < /Description > < Description > < em:locale >it< /em:locale > < em:name >nome< /em:name > < em:description >descrizione< /em:description > < /Description > ... Now (manifest.json) I see there is only one pair of name-discription, like this: { "name": "name", "description": "description", ... The problem is that I didn't find a way to specify the name-description pair for other languages. Trying { "name": "__MSG_extensionName__", "description": "__MSG_extensionDescription__", "default_locale": "it", ... with the usual locales structure (_locales/{lang}/manifest.json) { "application_title": { "message": "name" }, "application_description": { "message": "description" } } didn't work because when I upload my extension the AMO complains about non valid tag "default_locale". What am I doing wrong? Thank you

Geändert am von mtrevisan

Zitieren

Mehr Details zum System

Installierte Plugins

  • Shockwave Flash 32.0 r0

Anwendung

  • User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:64.0) Gecko/20100101 Firefox/64.0

Weitere Informationen

philipp
  • Top 25 Contributor
  • Moderator
5214 Lösungen 23055 Antworten
Veröffentlicht
hi, https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Internationalization should contain the specification for webextensions.
Hat Ihnen das weitergeholfen? 0
Zitieren

Fragesteller

I already followed that, and "[...] didn't work because when I upload my extension the AMO complains about non valid tag "default_locale". [...]"

I already followed that, and "[...] didn't work because when I upload my extension '''the AMO complains about non valid tag "default_locale"'''. [...]"

Geändert am von mtrevisan

Hat Ihnen das weitergeholfen?
Zitieren
philipp
  • Top 25 Contributor
  • Moderator
5214 Lösungen 23055 Antworten
Veröffentlicht

the article talks about a different structure (_locales/{lang}/messages.json - instead of localised manifest.json files)

the article talks about a different structure (_locales/{lang}/messages.json - instead of localised manifest.json files)
Hat Ihnen das weitergeholfen? 0
Zitieren

Fragesteller

no-one? that's too bad...

no-one? that's too bad...
Hat Ihnen das weitergeholfen?
Zitieren
AndRo Marian 2 Lösungen 26 Antworten
Veröffentlicht

You put the default_locale in a locale file ? What is the error ?

You put the default_locale in a locale file ? What is the error ?

Geändert am von AndRo Marian

Hat Ihnen das weitergeholfen? 0
Zitieren

Fragesteller

The error I got is that of 'non valid tag "default_locale"', as if it couldn't recognize the manifest.json

The error I got is that of 'non valid tag "default_locale"', as if it couldn't recognize the manifest.json

Geändert am von mtrevisan

Hat Ihnen das weitergeholfen?
Zitieren
TyDraniu
  • Top 25 Contributor
255 Lösungen 1414 Antworten
Veröffentlicht

"default_locale" should be "en" or "it". You have "vec".

"default_locale" should be "en" or "it". You have "vec".
Hat Ihnen das weitergeholfen? 0
Zitieren

Fragesteller

Ok, but my language is not present in the ISO 639-1, so it doesn't have a two-letter code. Only in ISO 639-3 there is. If the AMO does not work with ISO 639-3 that's a serious problem from my point of view, because my language will never work.

Ok, but my language is not present in the ISO 639-1, so it doesn't have a two-letter code. Only in ISO 639-3 there is. If the AMO does not work with ISO 639-3 that's a serious problem from my point of view, because my language will never work.
Hat Ihnen das weitergeholfen?
Zitieren

Fragesteller

I've tried putting "default_locale": "it", but without success.

I've tried putting "default_locale": "it", but without success.
Hat Ihnen das weitergeholfen?
Zitieren
Stellen Sie eine Frage

Sie müssen sich mit Ihrem Benutzerkonto anmelden, um auf Beiträge zu antworten. Bitte stellen Sie eine neue Frage, wenn Sie noch kein Benutzerkonto haben.