Welcome to Meta!

Afrikaans | العربية | অসমীয়া | asturianu | azərbaycanca | Boarisch | беларуская | беларуская (тарашкевіца) | български | ပအိုဝ်ႏဘာႏသာႏ | বাংলা | བོད་ཡིག | bosanski | català | کوردی | corsu | čeština | Cymraeg | dansk | Deutsch | Deutsch (Sie-Form) | Zazaki | ދިވެހިބަސް | Ελληνικά | emiliàn e rumagnòl | English | Esperanto | español | eesti | euskara | فارسی | suomi | français | Nordfriisk | Frysk | galego | Alemannisch | ગુજરાતી | עברית | हिन्दी | Fiji Hindi | hrvatski | magyar | հայերեն | interlingua | Bahasa Indonesia | Ido | íslenska | italiano | 日本語 | ქართული | ភាសាខ្មែរ | 한국어 | Qaraqalpaqsha | စှီၤ | kurdî | Limburgs | ລາວ | lietuvių | Minangkabau | македонски | മലയാളം | молдовеняскэ | Bahasa Melayu | မြန်မာဘာသာ | مازِرونی | Napulitano | नेपाली | Nederlands | norsk nynorsk | norsk | occitan | Kapampangan | Norfuk / Pitkern | polski | português | português do Brasil | پښتو | Runa Simi | română | русский | संस्कृतम् | sicilianu | سنڌي | Taclḥit | සිංහල | slovenčina | slovenščina | Soomaaliga | shqip | српски / srpski | svenska | ꠍꠤꠟꠐꠤ | ślůnski | தமிழ் | тоҷикӣ | ไทย | Türkmençe | Tagalog | Türkçe | татарча / tatarça | ⵜⴰⵎⴰⵣⵉⵖⵜ  | українська | اردو | oʻzbekcha / ўзбекча | vèneto | Tiếng Việt | 吴语 | 粵語 | 中文(简体) | 中文(繁體) | +/-

Hello, CalendulaAsteraceae. Welcome to the Wikimedia Meta-Wiki! This website is for coordinating and discussing all Wikimedia projects. You may find it useful to read our policy page. If you are interested in doing translations, visit Meta:Babylon. You can also leave a note on Meta:Babel or Wikimedia Forum if you need help with something (please read the instructions at the top of the page before posting there). Also worthwhile acquainting yourself with the functions of global user pages. Happy editing!

 — billinghurst sDrewth 05:02, 1 September 2023 (UTC)Reply

Small problem with the English babel

edit

Hi, CalendulaAsteraceae. I am writing to you because you have a lot of programming experience and maybe you can help :) I noticed a small problem with the English babel template. Every other language says something like:

This user has '''native speaker/basic/etc''' knowledge of [[:Category:User xx|language name]].

Notice how the level should be bolded. However the English babel level links back to the user's userpage on Meta instead of being bolded and unlinked. The issue shows up with every English-language level, you can see it happening both on yours (en-N) and on my (en-4) userpage. It does not happen on Wikipedia since there are more usercategories there. I hope you can help and thank you in advance :D Dream Indigo 11:00, 28 May 2024 (UTC)Reply

I'll take a look at this! Not sure if it's an issue in the Babel extension or the translations… —CalendulaAsteraceae (talkcontribs) 17:38, 27 June 2024 (UTC)Reply
Thank you! As far as I remember, it only happens here and it was working fine on translatewiki. I may be wrong, though. ✩ Dream Indigo ✩ 23:35, 27 June 2024 (UTC)Reply

Translatable module

edit

Hi!

A little surprise, hopefully a good one :)

I've been testing a new experimental feature, "Translatable modules". Its documentation can be found at mw:Help:Extension:Translate/Message Bundles/Lua reference. Very briefly, it allows Lua modules to store, translate, load, and parse strings in a way that is similar to how it's done in MediaWiki extensions, so that you won't have to store translated strings as hard-coded Lua arrays and write a lot of manual code with conditions and concatenations.

I've chosen the module Module:User Wikimedia project, to which you contributed a lot, as the first one on which I'm going to test it. I didn't do anything with your original code, but created a copy at Module:User Wikimedia project translatable. I haven't yet converted all the possible strings to the new framework yet, but only the ones that were in the function project_text().

The English strings are at User:Amire80/User Wikimedia project mb in JSON format. They are translatable by clicking the "Translate this message bundle" link at the top. I copied all the existing translations and made necessary modifications in them. So now, for example, you can use {{GENDER}} in the message instead of writing getContentLanguage():gender() for every language that needs it; you can use parameters like $1, $2, etc.; and you can use wikitext in the English srtings and in the translations instead of concatenating [[ and ]].

You can see examples of the most important functions for handling the strings in function project_text():

  • tmb = require 'mw.ext.translate.messageBundle' - loading the library ("tmb" stands for "translatabe message bundle")
  • tmb.new() - loading the messages
  • mb_lang1:t() - loading a specific message
  • :params() - sending parameters to the message ($1, $2, etc.)
  • frame:preprocess() - parsing {{GENDER}}

It's probably not perfect yet, but what do you think about this direction? I'm pretty sure that all the other strings can be converted to this system, too including support for language and project names. Eventually, the strings can be fully separated from the code. Amir E. Aharoni (WMF) (talk) 13:35, 4 March 2025 (UTC)Reply

I think this is a great idea! —CalendulaAsteraceae (talkcontribs) 01:32, 5 March 2025 (UTC)Reply