plotly / plotly/plotly.js

Locale dictionary not being included even though they exist

Offen
#7,450 1 Kommentar 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

bug P1
Vorherrschende Sprache
JavaScript
Sterne
18.3k
Forks
2k
Ø Merge
2 T. 12 Std.
Gemergte PRs (30 T.)
28

Beschreibung

I have included several of the Plotly Locales in my project before (es, pt-br, zh-ch, ar) and now I am trying to include Norwegian (no) but the translations dictionary is not working when setting "no" as the locale. The dictionary is returning an empty object.
The formatting is working and the dates and times are being translated to norwegian as they should be, but the modebar buttons are remaining english even though the dictionary translations are included in the plotly.js/lib/locales/no.js file.

I tested this with a couple of other languages to check that I wasn't missing something and the same problem occurs if I try to use romanian (ro) - the formatting is correct and present, but the dictionary translations are not working even though they are included in the file.

Image shows the plotly config including several languages, see that the Spanish (es) locale shows the occupied dictionary translations as it should, but the Norwegian (no) locale shows an empty object for the dictionary, however, includes the formats.
Image

Summary:
Norwegian locale dictionary is not working (returning empty objects when importing) even though the translations are included in plotly.js/lib/locales/no.js. Same problem occurs with Romanian - possibly others.

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne mit lib/locales/no.js und vergleiche dessen exportiertes Wörterbuch und Formate mit dem funktionierenden es-Locale. Reproduziere das Problem mit den no- und ro-Locale und verfolge anschließend, wie Locale-Wörterbücher importiert oder registriert werden. Als abgeschlossen gilt die Aufgabe, wenn die no- und ro-Wörterbücher gefüllt sind und ihre modebar-Übersetzungen angewendet werden, während die Formatierung korrekt bleibt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
javascript
Bereich
internationalization
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
42/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.