Mehrsprachiges Plugin :Globus mit Meridianen:

Das Multilingual-Plugin ermöglicht es Administratoren eines mehrsprachigen Forums, eine reichhaltige und verständliche Umgebung für alle Benutzer und Gäste zu schaffen, selbst wenn sie die Standardsprache oder die Mehrheitssprache des Forums nicht sprechen.

:page_facing_up: Code herunterladen

:book: Dokumentation lesen


Überblick über die Funktionen

Das Multilingual-Plugin erweitert das bestehende Discourse-Lokalisierungssystem und bietet Ihnen:

  1. eine administrative Oberfläche für alle auf Ihrem Forum verwendeten Sprachen;

  2. ein Sprachsystem für Inhalte, das Ihnen und Ihren Benutzern ermöglicht, Inhalte auf Ihrem Forum nach Sprache zu filtern;

  3. eine Integration mit dem Discourse Translator Plugin, das Aspekte des Sprachsystems für Inhalte automatisiert;

  4. die Möglichkeit, Kategorienamen, Tags und andere halb-dynamische Texte auf Ihrem Forum zu übersetzen;

  5. die Möglichkeit, die Verwendung vorhandener Schnittstellensprachen auf Ihrem Forum zu deaktivieren;

  6. die Möglichkeit, benutzerdefinierte Schnittstellensprachen („Locales") direkt zu Ihrem Forum hinzuzufügen;

  7. erweiterte Funktionen für die Gastensprache, einschließlich eines Wechsels für die Gastenschnittstellensprache („Locale") (als Fußzeilenleiste oder Menü); und

  8. optionale Felder für Schnittstellen- und Inhaltssprache bei der Registrierung (bald verfügbar).


:point_right: Bitte beachten Sie

Alle oben genannten Funktionen arbeiten auf Basis des bestehenden Discourse-Lokalisierungssystems und funktionieren in Verbindung mit allen Funktionen dieses Systems (siehe hier eine längere Erklärung dazu).

Wenn Sie Schnittstellensprachen („Locales") zu Discourse hinzufügen möchten, ist der beste Weg, dies zu tun, die Befolgung der Schritte, die hier beschrieben sind: How to add a new language. Sie können ein Locale auch über ein Plugin hinzufügen, wie hier beschrieben.

Die Möglichkeit, dies über die Admin-Oberfläche in diesem Plugin zu tun, sollte erst in Betracht gezogen werden, wenn die vorhandenen von Discourse unterstützten Methoden erschöpft sind. Alle Sprachen, die über die von Discourse unterstützten Methoden zu Discourse hinzugefügt werden, stehen automatisch für alle Funktionen in diesem Plugin zur Verfügung.


Beispielbilder

Admin-Oberfläche

Übersetzungen halb-dynamischer Texte (und Gast-Locale-Wechsler)

Sprachsystem für Inhalte

Screen Shot 2020-02-25 at 2.24.51 PM

Integration des Translator Plugins für das Sprachsystem für Inhalte


Credits

Dieses Plugin wurde durch die Unterstützung der Wikimedia Foundation ermöglicht, mit besonderer Unterstützung von @Elena_Lappen und @icaria36, die wesentliche Beiträge zum Design des Funktionsumfangs geleistet haben.

Für weitere Diskussionen über die Gedanken hinter diesem Plugin siehe:

Structuring a multilingual community

68 „Gefällt mir“

Wow! You have been busy. :slight_smile: Nice work, @angus! Look forward to seeing examples of this in the wild. Let me know if you need somebody like me to look at it and give feedback.

One gap has been the lack of a feature to enable staff to improve translations of posts provided by the translate plugin - is that going to be part of this effort?

10 „Gefällt mir“

hm. I’m not rulling it out, but that is probably more in the scope of the Translate Plugin.

A somehwat related feature which I built at one point for something else is a little count icon that shows for users when the locale they’re using falls back to the default locale because a translation is missing. Click the icon and you see:

“x translations missing for this page. Help us translate them here: (link to discourse’s transifex).”

7 „Gefällt mir“

Fantastic work as usual Angus! I’ve been testing it on my site and have a couple of small issues and some questions.

Issues

  1. When you edit an existing topic the dropdown menu text does not follow the theme colors:

image

  1. The content language setting becomes very hard to use beyond a couple of languages due to the single line

Questions

  1. It seems as though many of our old topics are getting the language tag retroactively, which is desired, but only a handful at this point. Will a job run to apply the tag to all existing posts eventually? If not, is there a way to apply a language tag to all existing posts? Our site has been only English up to this point so I want all existing posts to have the en tag.
  2. When you have multiple languages set under content languages should you be able to filter by an individual language? Currently when I click one of the languages in the drop down nothing happens.
2 „Gefällt mir“

Thanks for the feedback David and giving this a shot. I’ve pushed a number of udpates that, among other things, fix the two problems you mention above.

Not yet. Currently only the posts translated by the Translator plugin will automatically get a content tag retroactively (if the translator plugin is enabled and the sync feature is enabled).

I can add such a job, but it’ll need to take a specific language as a parmeter and run on a defined scope. In addition to a ‘site wide’ scope, I could do it on a per-category, or per (non-content) tag basis (i.e. apply this content tag to all topics in this category or with this other tag). What would work for you?

No, the list is mean to just show you what your content languages are currently set at. Could you walk me through how you expect (or would like) this to behave?

2 „Gefällt mir“

Thank you Angus, that fixed up my problems.

Ideally I would like to have the en tag applied to all existing posts that do not have a language tag, is that too broad? The problem is that if a user sets their content language to say English and Spanish, they will then only see the posts with the language tag, they will not see the thousands of posts that have no tag.

Because there is a list and they highlight when hovered, it gives the impression that they are clickable. My expectation in that case is that when you click on one of them your posts would be filtered by that language. I think this could be a useful feature to filter by language, but it’s not something I’m dying to have either.

On another note; I would love to have the option to move the language button. I have a lot of items in my nav bar already and it’s starting to get cluttered. Also the highlighted button looks out of place above the new topic button and it’s forcing the new topic button below. I suppose it’s not possible to move it to the beginning of the navbar, say before Latest? Or it could be floating in a corner like I have on my wordpress homepage https://naturephotographers.network , or it could go in the header similar to the option in the translate plugin.

I understand your reasoning for putting it in the navbar, because you are filtering similar to the other buttons, but the thing is that you would only set this once and then forget it. It’s not like you would be regularly filtering by different languages.

Thanks again, this plugin along with translate is a game changer.

3 „Gefällt mir“

To me, this is the desired behavior. Users must not see posts in a foreign language. If there is no post is their language, they must see no post.

However, as an option, a “bulk tagging” feature would be nice.

2 „Gefällt mir“

Agreed, the solution I proposed on Pavilion is if the default locale matches one of the selected topic languages, then show all posts without tags. But bulk tagging would be the better option.

@angus, I am not 100% sure if this is related to your plugin or a change in core, but there may be a bug I’ve come across. When I edit an existing post, make some changes and try to save I get this error None of the tags you selected can be used, there are no tags set except the en tag, and minimun number of tags required in a topic is set to 0. Any ideas?

2 „Gefällt mir“

Ran into another issue today Angus, I previously had an ig tag (short for instagram) that was deleted by the plugin to make way for the Igbo language. I assume there’s no way to get this back? I tried turning off the plugin in hopes that it may still be there, but alas it appears to be long gone. I know this a risk you take when testing plugins. You might want to add a warning that it will delete any tags with the same name.

3 „Gefällt mir“

I’ll pm you about that (It’s unlikely to be lost)

The other useful suggestions and feedback, I’ll be reviewing tomorrow.

3 „Gefällt mir“

My Godness! You are fantastic!
I mean, I really admire you. While I also hope this post will not distract people’s attention on your fabulous work.

7 „Gefällt mir“

Just a note that David and I have resolved this issue and restored the existing ig tags.

If there is a conflict between a pre-existing tag and a content language tag, the language won’t be available as a content language until the conflict is resolved. You’ll see this in your languages admin.

I’ll be addressing any other issues and feature requests in the coming week.

9 „Gefällt mir“

Lieber Angus, ist es möglich, nur den Sprachwechsler für Gäste zu verwenden? Ich muss nicht alle Funktionen dieses Systems nutzen – ich benötige lediglich die Möglichkeit, dass Gäste die Sprache der Benutzeroberfläche ändern können.

2 „Gefällt mir“

Jede Funktion des Plugins arbeitet unabhängig voneinander.

Installieren Sie das Plugin und aktivieren Sie einfach den Sprachumschalter: Pavilion.

Wir nutzen dieses Plugin derzeit auf thepavilion.io genau für diesen Zweck.

4 „Gefällt mir“

Fantastische Arbeit, @angus!

Wir haben das Plugin installiert, aber jetzt ist für Benutzer kein Inhalt mehr sichtbar, selbst nicht für das Personal. Wenn wir jedoch eine Kategorie bearbeiten und versuchen, sie zu löschen, erhalten wir folgende Warnung:

Der einzige Weg, auf ein Thema zuzugreifen, besteht darin, dem Link in der Warnmeldung zu folgen oder die URL des Themas zu kennen. Wenn wir auf das Thema (RIO Paris) zugreifen und dann einen Sprachinhaltstag hinzufügen, zum Beispiel „englisch“, wird es wie erwartet sichtbar. Unsere Vermutung ist, dass das mehrsprachige Plugin einwandfrei funktioniert. Nur Inhalte, die mit einem Tag verknüpft sind, werden angezeigt. Wir finden es jedoch irreführend und verwirrend, wenn Personen nicht alle verwandten Themen sehen können, ohne einen Sprachtag zuzuweisen. Wir haben Tausende von zuvor veröffentlichten Themen, die unsichtbar sind. Gibt es eine Lösung, um ihnen schnell einen Sprachtag zuzuweisen, da wir derzeit keine Liste sehen können?

Bitte geben Sie uns dazu eine Rückmeldung.

Edit: Ich habe mein Sichtbarkeitsproblem gelöst, indem ich alle Themen bestimmter Kategorien entsprechend der Sprache, die sie verwenden sollten, in Rails getaggt habe:

  1. cd /var/discourse und dann ./launcher enter app
  2. Die IDs der Kategorien mit rake categories:list abrufen
  3. Wenn eine Kategorie, die nur Themen auf Deutsch enthalten soll, die ID 245 hat, dann rake tags:bulk_tag_category["de",245] ausführen
1 „Gefällt mir“

Nach dem Ausführen von
./launcher rebuild app
erscheint eine leere Seite.

Ich habe festgestellt, dass dieses Plugin die Ursache ist. Weder die Website noch der Admin-Bereich sind zugänglich.

Ich habe nur den mehrsprachigen Inhalt aktiviert, aber keine Inhalte eingegeben.

Wie kann ich die Einstellungen dieses Plugins in der Datenbank zurücksetzen?

Funktioniert your.website.com/safe-mode?

Ich habe dieses Plugin jetzt deaktiviert. Die Probleme begannen mit dem Verschwinden der Plugin-Liste im Admin-Bereich. Danach habe ich versucht, die App neu zu erstellen. Aber nach dem Neuaufbau konnte die Seite nicht geöffnet werden. Jetzt öffnet sie sich, aber mit diesem Plugin deaktiviert.

@angus, kannst du dein Plugin mit einer frischen Version von Discourse überprüfen?

Im abgesicherten Modus ohne nicht-offizielle Plugins sehe ich diese Seite ohne Plugin-Liste:

Abgesicherter Modus ohne alle Plugins:

Ist es möglich, die Einstellungen dieses Plugins in der Datenbank zurückzusetzen?

Zu diesem Zeitpunkt konnte kein Modus das Problem lösen (sicher, ohne inoffizielle, ohne alle) – in allen Modi sah ich keine Liste der im System installierten Plugins.

1 „Gefällt mir“