How to structure a multilingual community

Hi Neil, this is awesome! Thanks for taking this project on.

I just tried out the new required tags feature and unfortunately it didn’t work for me.

I created a category and set the required tag.


Image Description: Screenshot showing that a category’s Category Tags setting requires 1 number of tags from the project management tag group.

But I was able to successfully create a topic without any tags. Is this reproducible anywhere?


Image Description: Screenshot of topic titled “Does requiring tag work? test” that was successfully posted without any tags.

1 Like

You’re an admin on the site, so you can do whatever you want. Test with a non-staff account to see what it looks like.

3 Likes

That explains everything and it worked beautifully, especially the tags showing up in the dropdown. THANK YOU.

Is it possible to add a link to the tags page in the error message?

1 Like

I can’t figure out how to stop requiring tags from a tag group. I have no tag group selected and can’t make num tags be zero.

2 Likes

Would unchecking the Also allow other tags remove the required minimum of “1” down below? Seems to me if you allow “other” tags, they would be in addition to at least one set tag (at the bottom).

Removing the tag group should be enough. Does that not work?

No. I can’t make it go away. There’s no tag group, but when creating a topic in the category, I still get:

and users are forced to choose a tag. (And it’s rather embarrassing that this is happening in a category where I’m asking people to say things about how I know how to support Discourse!)

Seems like a :bug: and should probably be in a separate topic. Sorry about that.

3 Likes

Yeah it must be a bug. I will look at it.

@pfaffman I fixed the problem today, so update to latest tests-passed and you should be able to remove the required tag group.

5 Likes

Hmm. I’m on this commit and see your two commits about tags as the most recent two.

I added and removed a required tag group, but there is still one tag required when creating a new topic. And I tried adding and removing some other tags, thinking that maybe it needed to delete something to get things cleared out.

I went into rails and changed minimum_required_tags to 0 by hand and that fixed it.

But then I tried to go back to requiring a tag from a tag group to see if I could then remove the required tag. I chose a tag group and set the required number to 1 (and then 2) but now (at least as admin) I can create a topic with no tags. Looking at the record in rails it seems that minimum_required_tags is not getting set.

This is on the master site of a multisite config with no non-official plugins.

1 Like

Hmmm minimum_required_tags… Maybe I misunderstood what you were trying to do. Are you changing this setting (which should be in the Tags tab, but it’s in the Settings tab):

The min_tags_from_required_group value is probably what you should be looking at, but it’s irrelevant if required_tag_group_id is null.

3 Likes

@neil Sorry it’s take so long to respond, but I’ve taken advanage of your work here in a new plugin I’m building to implement the feature set I laid out above. It uses a modified version of the structure you added to require all topics carry a langauge tag if a site setting is enabled. So, thank you!

More notes the 'multilingual plugin' (in development) if anyone is interested.

Repository: GitHub - paviliondev/discourse-multilingual

Hopefully the user interface is relatively self-explanatory, but a few notes on the nomenclature and current behavior:

  1. Type “Base” means that the language is part of the “base list” of languages. Currently the base list is the full list languages in the Discourse codebase, specifically this list: discourse/names.yml at master · discourse/discourse · GitHub. The plugin is built in such a way that the base list can be changed at a later date if need be (albeit with some minor code changes).

  2. You’ll notice that a number of the “Base” list languages are listed has having “no translations”. This reflects the fact that the list of supported locales in Discourse is a subset of the list of languages in names.yml. No doubt, the goal is to add more supported locales over time, however this is dependent on the translation of Discourse into different locales (managed in Transifex).

  3. You can add new languages by uploading a .yml file in the format:

    iso_code: native name
    iso_code: native name
    ...
    

    You can include as made languages as you like in the file. You upload the file by clicking “Upload Languages” and selecting the .yml file. The list will automatically refresh with the new language added. Languages added in this way will show as type “Custom”.

  4. You can sort the list by any of the headings (apart from “Actions”) by clicking on the heading. You can also filter the list using the filter input in the top left (one minor issue with this is that it refreshes on every character added; I will fix this later).

  5. The checkboxes in the Content and Locale columns denote whether the language should be used as a content filter and / or locale. The locale management functionality is not yet complete so the checkboxes in that column will not function properly (and custom languages without locale translations will show a checkbox, instead of “no translations”).

  6. The chexboxes in the Content column will change the availability of the content languages to users, i.e if this checkbox is disabled:

    1. There will be no content language tag for that language listed in the content language selector in the composer.

    2. A user will not be able to select the content language in their profile.

Note also that the user’s content language and locale selectors are grouped at the top of their interface settings.

Note also that the initialization of the language selector in the composer (i.e. adding the user’s content lanaguage by default) should now be working.

Note also that the site setting multilingual require language tag determines whether a language tag is required. It has three potential values: no (not required of anyone), yes (required of everyone), non-staff (required of non-staff).

7 Likes

can u share you mutisite install guide?

1 Like