Git Product home page Git Product logo

languageswitch's People

Contributors

brunowego avatar m-reimer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

acidburn0zzz

languageswitch's Issues

lang indicator on the icon

Many thanks for the extension.
Is it possible to add something like a language overlay to the icon, so that you see, which language is selected?

Trainline.com/fr top menu hidden

Hi,

I noticed an issue on the following website https://www.thetrainline.com/fr It may affect other websites.
When logged in on the website with the addon activated, the top menu is no more visible.
2020-09_trainline_locale-sw1

As the addon is deactivated and the page reloaded (CTRL F5), the menu is visible again
2020-09_trainline_locale-sw2

Updated translations for 'id': Indonesian (Bahasa Indonesia)

Your translation have been copied to your clipboard. Paste it here:

Updated translations for 'id': Indonesian (Bahasa Indonesia):

{
  "extensionDescription": {
    "message": "Memungkinkan untuk mengubah pengenal bahasa yang dikirim ke server web",
    "description": "Description of the extension",
    "hash": "098663c971e4d0add100963aa184d584"
  },
  "menuentryDefault": {
    "message": "Default",
    "description": "Menu entry to use browser default setting",
    "hash": "229c53203d001a81c6535deec232da82"
  },
  "menuentryEnglish": {
    "message": "Inggris",
    "description": "Menu entry for the English language",
    "hash": "648e324401faf8ae90395ce21e894596"
  },
  "menuentryFrench": {
    "message": "Perancis",
    "description": "Menu entry for the French language",
    "hash": "09a22929e52b1a0c2d830c4415f09290"
  },
  "menuentryGerman": {
    "message": "Jerman",
    "description": "Menu entry for the German language",
    "hash": "730e124165ee254c3f3c34c40acc10dc"
  },
  "menuentryJapanese": {
    "message": "Jepang",
    "description": "Menu entry for the Japanese language",
    "hash": "ed0730b295dca59e5a09fa843eb87c8d"
  },
  "menuentrySpanish": {
    "message": "Spanyol",
    "description": "Menu entry for the Spanish language",
    "hash": "c58ca0cfe7f76c9bef2da8033fd644eb"
  },
  "general_headline": {
    "message": "Umum",
    "description": "Headline above the general configuration options",
    "hash": "e90d858c95232c95e34b4bb2f25b69e4"
  },
  "autoreload_label": {
    "message": "Memuat ulang halaman saat ini secara otomatis",
    "description": "Label for the checkbox for enabling autoreload",
    "hash": "26802ad9917a0ade59319025480aa5cf"
  },
  "menuentries_headline": {
    "message": "Entri menu bahasa",
    "description": "Headline above the language entries configuration list",
    "hash": "90fd7720b2260141221ab9a175d4d805"
  },
  "menuitem_label_label": {
    "message": "Label",
    "description": "Header for the label column in config list",
    "hash": "6af54e4f44a97d7e4a804e2e9a2536e5"
  },
  "menuitem_value_label": {
    "message": "Nilai",
    "description": "Header for the value column in config list",
    "hash": "44e8c8817b22394520de33b6e522a806"
  },

  "__WET_LOCALE__": { "message": "id" }
}

Apply to current tab only

Like #4, but instead of saving settings per website and adding a configuration widget, feature a checkbox at the bottom of the menu that applies the change to the current tab only.

Per-site settings

Thanks for the nice simple addon.
It would be good if you could also have different settings depending on the site you are visiting.
For most sites I would like to keep the default language, but some I'd like to read in a different language.
I'm not sure if it would be within scope of this addon, it's just a suggestion. :-)

Does not work with Firefox 90.0.2 !

Hi.

This add-on no more work with firefox 87.0 !

I'm on Fedora Linux 32 X64 bit Cinnamon edition, & my firefox installed from official Fedora repositories ....

Best.

Updated translations for 'fr': French (français, langue française)

Your translation have been copied to your clipboard. Paste it here:

Updated translations for 'fr': French (français, langue française):

{
  "extensionDescription": {
    "message": "Permet de changer l'identifiant de langue envoyé aux serveurs web",
    "description": "Description of the extension",
    "hash": "098663c971e4d0add100963aa184d584"
  },
  "menuentryDefault": {
    "message": "Defaut",
    "description": "Menu entry to use browser default setting",
    "hash": "229c53203d001a81c6535deec232da82"
  },
  "menuentryEnglish": {
    "message": "Anglais",
    "description": "Menu entry for the English language",
    "hash": "648e324401faf8ae90395ce21e894596"
  },
  "menuentryFrench": {
    "message": "Français",
    "description": "Menu entry for the French language",
    "hash": "09a22929e52b1a0c2d830c4415f09290"
  },
  "menuentryGerman": {
    "message": "Allemand",
    "description": "Menu entry for the German language",
    "hash": "730e124165ee254c3f3c34c40acc10dc"
  },
  "menuentryJapanese": {
    "message": "Japonais",
    "description": "Menu entry for the Japanese language",
    "hash": "ed0730b295dca59e5a09fa843eb87c8d"
  },
  "menuentrySpanish": {
    "message": "Espagnol",
    "description": "Menu entry for the Spanish language",
    "hash": "c58ca0cfe7f76c9bef2da8033fd644eb"
  },
  "general_headline": {
    "message": "Général",
    "description": "Headline above the general configuration options",
    "hash": "e90d858c95232c95e34b4bb2f25b69e4"
  },
  "autoreload_label": {
    "message": "Rechargement automatique de la page courante",
    "description": "Label for the checkbox for enabling autoreload",
    "hash": "26802ad9917a0ade59319025480aa5cf"
  },
  "menuentries_headline": {
    "message": "Entrées du menu des langages",
    "description": "Headline above the language entries configuration list",
    "hash": "90fd7720b2260141221ab9a175d4d805"
  },
  "menuitem_label_label": {
    "message": "Etiquette",
    "description": "Header for the label column in config list",
    "hash": "6af54e4f44a97d7e4a804e2e9a2536e5"
  },
  "menuitem_value_label": {
    "message": "Valeur",
    "description": "Header for the value column in config list",
    "hash": "44e8c8817b22394520de33b6e522a806"
  },

  "__WET_LOCALE__": { "message": "fr" }
}

Updated translations for 'ko': Korean (한국어)

{
"extensionDescription": {
"message": "웹 서버로 보내는 언어 식별자를 변경할 수 있습니다.",
"description": "Description of the extension",
"hash": "098663c971e4d0add100963aa184d584"
},
"menuentryDefault": {
"message": "기본값",
"description": "Menu entry to use browser default setting",
"hash": "229c53203d001a81c6535deec232da82"
},
"menuentryEnglish": {
"message": "영어",
"description": "Menu entry for the English language",
"hash": "648e324401faf8ae90395ce21e894596"
},
"menuentryFrench": {
"message": "프랑스어",
"description": "Menu entry for the French language",
"hash": "09a22929e52b1a0c2d830c4415f09290"
},
"menuentryGerman": {
"message": "독일어",
"description": "Menu entry for the German language",
"hash": "730e124165ee254c3f3c34c40acc10dc"
},
"menuentryJapanese": {
"message": "일본어",
"description": "Menu entry for the Japanese language",
"hash": "ed0730b295dca59e5a09fa843eb87c8d"
},
"menuentrySpanish": {
"message": "에스파냐어",
"description": "Menu entry for the Spanish language",
"hash": "c58ca0cfe7f76c9bef2da8033fd644eb"
},
"general_headline": {
"message": "일반",
"description": "Headline above the general configuration options",
"hash": "e90d858c95232c95e34b4bb2f25b69e4"
},
"autoreload_label": {
"message": "페이지가 변경될 때 자동으로 새로 고침",
"description": "Label for the checkbox for enabling autoreload",
"hash": "26802ad9917a0ade59319025480aa5cf"
},
"menuentries_headline": {
"message": "언어 메뉴 항목",
"description": "Headline above the language entries configuration list",
"hash": "90fd7720b2260141221ab9a175d4d805"
},
"menuitem_label_label": {
"message": "표시 이름",
"description": "Header for the label column in config list",
"hash": "6af54e4f44a97d7e4a804e2e9a2536e5"
},
"menuitem_value_label": {
"message": "값",
"description": "Header for the value column in config list",
"hash": "44e8c8817b22394520de33b6e522a806"
},
}

Invalid header array: in Browser Console after restart and with language "Default"

First, I am no web or addon developer so if this is all nonsense, feel free
to ignore it :-).

I am using 2.9.0 with esr-91. While debugging some other stuff, I noted the
following error in the Browser Console for each request:

Invalid header array: [{name:"Host", value:"www"}, {name:"User-Agent", value:"Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0"}, {name:"Accept", value:"image/webp,/"}, {name:"Accept-Language", value:(void 0)}, {name:"Accept-Encoding", value:"gzip, deflate"}, {name:"DNT", value:"1"}, {name:"Connection", value:"keep-alive"}, {name:"Referer", value:"http://www/"}]

Please note the: name:"Accept-Language", value:(void 0)

I tracked it down to this extension. It happens if no specific language is
selected ("Default") and also never had been during the browser session.
As soon as you select any language and go back to "Default" the problem
is gone.

This reason might be that gAcceptLanguage is undefined (until it once
got set and possibly reset) but RewriteAcceptLanguage() only tests
if it's empty (and not if it is undefined). I fixed it here with:

--- background.js.ORI   2021-12-24 09:05:11.000000000 +0100
+++ background.js       2021-12-31 11:28:28.000000000 +0100
@@ -100,7 +100,7 @@
 
 // Header rewrite handler. Rewrites "Accept-Language".
 function RewriteAcceptLanguage(e) {
-  if (gAcceptLanguage != "") {
+  if (typeof gAcceptLanguage !== 'undefined' && gAcceptLanguage != "") {
     e.requestHeaders.forEach(function(header){
       if (header.name.toLowerCase() == "accept-language")
         header.value = gAcceptLanguage;

Another fix might be:

--- background.js.ORI   2021-12-24 09:05:11.000000000 +0100
+++ background.js       2021-12-31 11:58:38.386200000 +0100
@@ -1,5 +1,5 @@
 // Holds the current Accept-Language value
-let gAcceptLanguage;
+let gAcceptLanguage = "";

but I don't know if it might get undefined somewhere else...

Updated translations for 'ru': Russian (Русский)

Updated translations for 'ru': Russian (Русский):

{
  "extensionDescription": {
    "message": "Позволяет менять языковой идентификатор отправляемый серверам",
    "description": "Description of the extension",
    "hash": "098663c971e4d0add100963aa184d584"
  },
  "menuentryDefault": {
    "message": "По умолчанию",
    "description": "Menu entry to use browser default setting",
    "hash": "229c53203d001a81c6535deec232da82"
  },
  "menuentryEnglish": {
    "message": "Английский",
    "description": "Menu entry for the English language",
    "hash": "648e324401faf8ae90395ce21e894596"
  },
  "menuentryFrench": {
    "message": "Французкий",
    "description": "Menu entry for the French language",
    "hash": "09a22929e52b1a0c2d830c4415f09290"
  },
  "menuentryGerman": {
    "message": "Немецкий",
    "description": "Menu entry for the German language",
    "hash": "730e124165ee254c3f3c34c40acc10dc"
  },
  "menuentryJapanese": {
    "message": "Японский",
    "description": "Menu entry for the Japanese language",
    "hash": "ed0730b295dca59e5a09fa843eb87c8d"
  },
  "menuentrySpanish": {
    "message": "Испанский",
    "description": "Menu entry for the Spanish language",
    "hash": "c58ca0cfe7f76c9bef2da8033fd644eb"
  },
  "general_headline": {
    "message": "Основные настройки",
    "description": "Headline above the general configuration options",
    "hash": "e90d858c95232c95e34b4bb2f25b69e4"
  },
  "autoreload_label": {
    "message": "Автоматически перезагрузить страницу под выбранный язык",
    "description": "Label for the checkbox for enabling autoreload",
    "hash": "26802ad9917a0ade59319025480aa5cf"
  },
  "menuentries_headline": {
    "message": "Меню значений для подмены",
    "description": "Headline above the language entries configuration list",
    "hash": "90fd7720b2260141221ab9a175d4d805"
  },
  "menuitem_label_label": {
    "message": "Язык",
    "description": "Header for the label column in config list",
    "hash": "6af54e4f44a97d7e4a804e2e9a2536e5"
  },
  "menuitem_value_label": {
    "message": "Значение",
    "description": "Header for the value column in config list",
    "hash": "44e8c8817b22394520de33b6e522a806"
  },

  "__WET_LOCALE__": { "message": "ru" }
}

dispatch languagechange event

Changing the preferred language with Language Switch doesn't lead to any languagechange event.

From the HTML standard: «Fired at the global scope object when the user's preferred languages change.»

It is therefore necessary to set Language Switch language to "default", and then to change the "real" NavigatorLanguage via intl.accept_languages in Firefox to test this kind of feature.

I never contributed to a Firefox extension, but I would be happy to help implement this feature.

Updated translations for 'da': Danish (dansk)

Updated translations for 'da': Danish (dansk):

{
  "extensionDescription": {
    "message": "Giver mulighed for at ændre sprogidentiteten der sendes til webservere",
    "description": "Description of the extension",
    "hash": "098663c971e4d0add100963aa184d584"
  },
  "menuentryDefault": {
    "message": "Standard",
    "description": "Menu entry to use browser default setting",
    "hash": "229c53203d001a81c6535deec232da82"
  },
  "menuentryEnglish": {
    "message": "engelsk",
    "description": "Menu entry for the English language",
    "hash": "648e324401faf8ae90395ce21e894596"
  },
  "menuentryFrench": {
    "message": "fransk",
    "description": "Menu entry for the French language",
    "hash": "09a22929e52b1a0c2d830c4415f09290"
  },
  "menuentryGerman": {
    "message": "tysk",
    "description": "Menu entry for the German language",
    "hash": "730e124165ee254c3f3c34c40acc10dc"
  },
  "menuentryJapanese": {
    "message": "japansk",
    "description": "Menu entry for the Japanese language",
    "hash": "ed0730b295dca59e5a09fa843eb87c8d"
  },
  "menuentrySpanish": {
    "message": "spansk",
    "description": "Menu entry for the Spanish language",
    "hash": "c58ca0cfe7f76c9bef2da8033fd644eb"
  },
  "menuentries_headline": {
    "message": "Elementer i Sprogmenuen",
    "description": "Headline above the language entries configuration list",
    "hash": "90fd7720b2260141221ab9a175d4d805"
  },
  "menuitem_label_label": {
    "message": "Felt",
    "description": "Header for the label column in config list",
    "hash": "6af54e4f44a97d7e4a804e2e9a2536e5"
  },
  "menuitem_value_label": {
    "message": "Værdi",
    "description": "Header for the value column in config list",
    "hash": "44e8c8817b22394520de33b6e522a806"
  },

  "__WET_LOCALE__": { "message": "da" }
}

Can't able to change language.

I added this plugin yesterday. I tried it on many different site but it didn't change language of any site.Help me how to use this extension in mozilla.

Not working in private windows

I have allowed languageswitch to run in private windows, but when I try to select an entry in the language list, nothing happens. The click is ignored and the list stays open.

Switching languages works as expected in normal windows.

Firefox: 77.0.1
languageswitch: 2.0.0

Updated translations for 'nl': Dutch (Nederlands, Vlaams)

Your translation have been copied to your clipboard. Paste it here:

Updated translations for 'nl': Dutch (Nederlands, Vlaams):

{
  "extensionDescription": {
    "message": "Maakt het mogelijk om de taalidentificatie te veranderen die naar webservers wordt gestuurd",
    "description": "Description of the extension",
    "hash": "098663c971e4d0add100963aa184d584"
  },
  "menuentryDefault": {
    "message": "Standaard",
    "description": "Menu entry to use browser default setting",
    "hash": "229c53203d001a81c6535deec232da82"
  },
  "menuentryEnglish": {
    "message": "Engels",
    "description": "Menu entry for the English language",
    "hash": "648e324401faf8ae90395ce21e894596"
  },
  "menuentryFrench": {
    "message": "Frans",
    "description": "Menu entry for the French language",
    "hash": "09a22929e52b1a0c2d830c4415f09290"
  },
  "menuentryGerman": {
    "message": "Duits",
    "description": "Menu entry for the German language",
    "hash": "730e124165ee254c3f3c34c40acc10dc"
  },
  "menuentryJapanese": {
    "message": "Japans",
    "description": "Menu entry for the Japanese language",
    "hash": "ed0730b295dca59e5a09fa843eb87c8d"
  },
  "menuentrySpanish": {
    "message": "Spaans",
    "description": "Menu entry for the Spanish language",
    "hash": "c58ca0cfe7f76c9bef2da8033fd644eb"
  },
  "general_headline": {
    "message": "Algemeen",
    "description": "Headline above the general configuration options",
    "hash": "e90d858c95232c95e34b4bb2f25b69e4"
  },
  "autoreload_label": {
    "message": "Automatisch herladen van huidige pagina bij wisselen",
    "description": "Label for the checkbox for enabling autoreload",
    "hash": "26802ad9917a0ade59319025480aa5cf"
  },
  "menuentries_headline": {
    "message": "Taal menu opties",
    "description": "Headline above the language entries configuration list",
    "hash": "90fd7720b2260141221ab9a175d4d805"
  },
  "menuitem_label_label": {
    "message": "Label",
    "description": "Header for the label column in config list",
    "hash": "6af54e4f44a97d7e4a804e2e9a2536e5"
  },
  "menuitem_value_label": {
    "message": "Waarde",
    "description": "Header for the value column in config list",
    "hash": "44e8c8817b22394520de33b6e522a806"
  },

  "__WET_LOCALE__": { "message": "nl" }
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.