Module:Convert সম্পাদনা

I have copied these pages from en.wikipedia: Module:Convert/data and Module:Convert/text and Template:Convert/sandboxlua. I also checked that Module:Convert is a copy of the module from en.wikipedia. The following shows some tests:

  • {{convert/sandboxlua|70|mi|km}} → ৭০ মাইল (১১০ কিমি)
  • {{convert/sandboxlua|70|kg|lb}} → ৭০ কিলোগ্রাম (১৫০ পা)

Johnuniq (আলাপ) ১১:২৩, ২৩ জুন ২০১৩ (ইউটিসি)উত্তর দিন


I have restored Template:Convert to use the Lua module. The module has several problems when used here (for example, the unit names have not yet been customized, so it's showing "metre" instead of "মিটার"). However, whatever is causing the previous template to break seems to be causing severe problems, so maybe a half-working module is better than the previous template? I will return in the next day or two to clean it up. To remove what I did, just undo my last edit to Template:Convert/sandboxlua. Johnuniq (আলাপ) ১২:০০, ২৪ জুন ২০১৩ (ইউটিসি)উত্তর দিন

Update: I have moved the links to my user page. Johnuniq (আলাপ) ০২:৫০, ১৭ ফেব্রুয়ারি ২০১৪ (ইউটিসি)উত্তর দিন

Unit names সম্পাদনা

I got your message.--বেলায়েত (আলাপ | অবদান) ০৯:৫৮, ২৪ জুলাই ২০১৩ (ইউটিসি)উত্তর দিন

Thanks, I see that the standard orange bar is used here. There is a new notification system at en.wikipedia which is not nearly so noticeable. Johnuniq (আলাপ) ১০:২৪, ২৫ জুলাই ২০১৩ (ইউটিসি)উত্তর দিন

Module:Location map সম্পাদনা

@User:Aftabuzzaman: I am starting to look at your report at en:WT:Lua#Script error. I have edited Module:অবস্থান মানচিত্র/খেলাঘর. See "TODO" for stuff I have not yet looked at.

Template:অবস্থান মানচিত্র/sandbox uses wikitext like:

{{#invoke:অবস্থান মানচিত্র/খেলাঘর|main|Croatia|coordinates={{Coord|44|26|N|15|3|E}}}}

I do not understand how that relates to {{Infobox settlement}}. Please set up a test that shows an error such as at ছাতনা. The following, from that article, shows the error:

{{Infobox settlement
|name = Example
|pushpin_map = India West Bengal # India
|coordinates = {{coord|23|18|06.3|N|86|58|57.8|E|display=inline,title}}
}}

Johnuniq (আলাপ) ১০:০৩, ৫ আগস্ট ২০১৭ (ইউটিসি)উত্তর দিন

Because Module:Location map has coordinates parameter which is used by {{Infobox settlement}} via {{Location map}}. If {{#invoke:অবস্থান মানচিত্র/খেলাঘর|main|Croatia|coordinates={{Coord|44|26|N|15|3|E}}}} gives correct result, automatically |coordinates = {{coord|23|18|06.3|N|86|58|57.8|E|display=inline,title}}also give you correct result. anyway, i set up a test page here. (note: Module:Location map/sandbox isn't live, so to test টেমপ্লেট:অবস্থান মানচিত্র/sandbox/Infobox settlement, you have to put this {{#invoke:অবস্থান মানচিত্র/খেলাঘর|main}} code here). --আফতাব (আলাপ) ১৮:১১, ৫ আগস্ট ২০১৭ (ইউটিসি)উত্তর দিন
@User:Aftabuzzaman: Thanks, but what I need is a page where the Infobox settlement error I mentioned above is shown. Preferably there should be no other tests on that page because I want to keep it simple. However, everything would use sandbox templates and modules so I can experiment with them. The test case would use "Infobox settlement/sandbox" and it would do whatever it does, but would end up invoking মডিউল:অবস্থান মানচিত্র/খেলাঘর (Module:Location map/sandbox). I am happy if the templates involved use /খেলাঘর rather than /sandbox. Clicking "Edit source" on the test page should show, under "Templates used on this page", that মডিউল:অবস্থান মানচিত্র/খেলাঘর is used. Johnuniq (আলাপ) ০৭:৪৬, ৬ আগস্ট ২০১৭ (ইউটিসি)উত্তর দিন
Ok. Everything is done accordingly:
1) Template:অবস্থান মানচিত্র/খেলাঘর for invoking module
2) Template:Infobox settlement/খেলাঘর it does whatever {{Infobox settlement}} does except it use Template:অবস্থান মানচিত্র/খেলাঘর
3) Template:Infobox settlement/sandbox for testing settlement
4) Template:অবস্থান মানচিত্র/sandbox for testing Location map.
Sorry, do you want settlement's test page with one example or do you want article page? if you want settlement's test page with one example then remove other three examples from Template:Infobox settlement/sandbox or if you want article page here are some articles: সাইদ বন্দর, কোল্লাম মহানগর অঞ্চল, কাস্কো ভিয়েজো, পানামা, জৈসলমের জেলা. --আফতাব (আলাপ) ১৪:২৬, ৬ আগস্ট ২০১৭ (ইউটিসি)উত্তর দিন
Thanks. I put a test in my sandbox and will work with that at first. Johnuniq (আলাপ) ১১:২১, ৭ আগস্ট ২০১৭ (ইউটিসি)উত্তর দিন
I think you should add coord direction there, otherwise it will always give you error. --আফতাব (আলাপ) ১৪:৫১, ৭ আগস্ট ২০১৭ (ইউটিসি)উত্তর দিন
Thanks! I don't know that happened or how long I would have failed to notice the blunder. Johnuniq (আলাপ) ২২:৫৮, ৭ আগস্ট ২০১৭ (ইউটিসি)উত্তর দিন

@User:Aftabuzzaman: I have edited মডিউল:অবস্থান মানচিত্র/খেলাঘর (Module:Location map/sandbox) with some fixes that might be all that is needed. Please test and let me know if there are any problems. I decided to translate all the parameters in the way that you had done. My code is much more efficient and covers all the cases where getArgs is used. That is probably necessary although there is a lot about the module and how it is used that I do not understand.

When I originally looked at the module, I started with some translation code in coord2text and felt compelled to clean up the enwiki original which was unduly complex. I see no reason to restore the original enwiki code and in the future I might propose that en:Module:Location map be changed in a similar manner. It is true that regex code is always difficult and likely to not do what the programmer wanted—there is a well-known joke that if you have a problem and solve it using a regex, the result is that you have two problems [the original problem plus the problem of getting the regex to work for all inputs]. Therefore, I can understand that people don't want to think about when mw.ustring.match is needed, but it is not needed in coord2text and it is a lot slower than Lua's string.match. Johnuniq (আলাপ) ০২:৪৩, ৮ আগস্ট ২০১৭ (ইউটিসি)উত্তর দিন

Everything is working except one thing. Problem is if map name contain any of those word: পূর্ব, পশ্চিম, উত্তর or দক্ষিণ module replace that word with following E, W, N, S. For example, if map name is দক্ষিণ আফ্রিকা (South Africa) module replace that with Sআফ্রিকা () and because Template:অবস্থান মানচিত্র Sআফ্রিকা or Module:অবস্থান মানচিত্র/উপাত্ত/Sআফ্রিকা didn't exist, module return error. see test 1 here & test case 2 here. --আফতাব (আলাপ) ১৬:০৩, ৮ আগস্ট ২০১৭ (ইউটিসি)উত্তর দিন
That should be fixed now. There may be other parameters that should not be translated. Johnuniq (আলাপ) ২২:৫৯, ৮ আগস্ট ২০১৭ (ইউটিসি)উত্তর দিন
I had a quick look at the documentation at en:Template:Location map. Do you agree that the following parameters should not be translated?
alt, AlternativeMap, caption, overlay_image
I added them as "no translate". Johnuniq (আলাপ) ২৩:১১, ৮ আগস্ট ২০১৭ (ইউটিসি)উত্তর দিন
It seems everything working as expected. So implemented the patch. Thank you very very much for fixing this module. --আফতাব (আলাপ) ১৫:৫১, ৯ আগস্ট ২০১৭ (ইউটিসি)উত্তর দিন
Good! Johnuniq (আলাপ) ১০:২৮, ১০ আগস্ট ২০১৭ (ইউটিসি)উত্তর দিন

Module:Location map/many সম্পাদনা

Hi, i'm sorry for disturbing again. after updating Module:Location map, i thought "Module:Location map/many" will work automatically but it gives error. Main problem is it's work with lat1_deg, lat2_deg, lon1_deg, lon2_deg etc parameter but doesn't work with coordinates, coordinates2, coordinates3 etc parameter. Could you please take a look?

Module:অবস্থান মানচিত্র/বহু/খেলাঘর -Module:Location map/many/sandbox (same code as enwiki)
Template:অবস্থান মানচিত্র বহু/খেলাঘর -for invoking module
Template:অবস্থান মানচিত্র বহু/sandbox -test page

--আফতাব (আলাপ) ২২:৫৫, ১৯ আগস্ট ২০১৭ (ইউটিসি)উত্তর দিন

The problem is that মডিউল:অবস্থান মানচিত্র/বহু/খেলাঘর (Module:Location map/many/sandbox) is directly calling p.mark in মডিউল:অবস্থান মানচিত্র (Module:Location map). The translations I put in the latter are only effective when the module is invoked from a template. I'll think about how to fix that later. If you don't hear from me within three days I have probably been distracted and forgotten, so please remind me by posting here. Johnuniq (আলাপ) ০৫:০৭, ২০ আগস্ট ২০১৭ (ইউটিসি)উত্তর দিন
Thanks & Ok. আফতাব (আলাপ) ১৪:৪৫, ২০ আগস্ট ২০১৭ (ইউটিসি)উত্তর দিন
Off-wiki difficulties have delayed me, but this should be fixed within a week from now. Johnuniq (আলাপ) ২২:৩৭, ২২ আগস্ট ২০১৭ (ইউটিসি)উত্তর দিন
Ok. আফতাব (আলাপ) ২২:৪২, ২২ আগস্ট ২০১৭ (ইউটিসি)উত্তর দিন
টেমপ্লেট:অবস্থান মানচিত্র বহু/খেলাঘর Template:Location map many/sandbox
টেমপ্লেট:অবস্থান মানচিত্র বহু/sandbox test page
মডিউল:অবস্থান মানচিত্র/খেলাঘর Module:Location map/sandbox
মডিউল:অবস্থান মানচিত্র/বহু/খেলাঘর Module:Location map/many/sandbox
মডিউল:অবস্থান মানচিত্র Module:Location map
মডিউল:অবস্থান মানচিত্র/বহু Module:Location map/many

@আফতাব: I edited মডিউল:অবস্থান মানচিত্র/খেলাঘর (Module:Location map/sandbox) to enhance the way translation works. The modules are complex and it is not clear what templates or modules that I know nothing about may use them. That is, I am not confident that everything will work. Problems may be discovered but they will have to be found from trial and error. Please check the results and let me know how it goes. Johnuniq (আলাপ) ০৯:৪৪, ২৬ আগস্ট ২০১৭ (ইউটিসি)উত্তর দিন

Thank you. I implemented the patch. I think everything is working but if i find anything, i will let you know. --আফতাব (আলাপ) ১৬:৪৭, ২৬ আগস্ট ২০১৭ (ইউটিসি)উত্তর দিন

Module:Coordinates সম্পাদনা

By the way, I noticed that Template:Coord has some tricky wikitext whereas en:Template:Coord just invokes the module. I do not understand the details, but you might like to think about whether to update the template. You would also need to update মডিউল:স্থানাঙ্ক from en:Module:Coordinates. If wanted, I can help do that by transferring the translations you have done to a sandbox Coordinates module. Johnuniq (আলাপ) ০৩:৫৩, ৮ আগস্ট ২০১৭ (ইউটিসি)উত্তর দিন

I updated Template:Coord. It will be great if you help with মডিউল:স্থানাঙ্ক also. here is everything:
1) Module:স্থানাঙ্ক/খেলাঘর sandbox (everything same as enwiki with solution. Solution only give bengali result. But current problem is if i give input in bengali, module return error. also coord2text isn't working. Important:two gadgets, GeoData API depends on this module's {{#coordinates:}} function, //tools.wmflabs.org/geohack/geohack.php also, i guess those won't work in bengali digit. So we have to make sure whatever the input is (en/bn), those function gets their input in en digit and at the same time visible result should be in bengali. Current Module:স্থানাঙ্ক's code does that correctly. Expand this {{coord|44.112|N|87.913|W}} here, you will understand what i'm trying to tell you.)
2) Template:Coord/খেলাঘর for invoking module
3) Template:Coord/sandbox for testing
--আফতাব (আলাপ) ১৬:৪১, ৮ আগস্ট ২০১৭ (ইউটিসি)উত্তর দিন
I edited মডিউল:স্থানাঙ্ক/খেলাঘর (Module:Coordinates/sandbox) and put some extra tests in my sandbox. I was a bit rushed and will need to check everything carefully later. In particular, the new code translates all arguments for coordinsert and I have not yet looked at that function or what it is supposed to do. Johnuniq (আলাপ) ১০:১৬, ৯ আগস্ট ২০১৭ (ইউটিসি)উত্তর দিন
Thanks. After your edit everything is working. but there is a little problem. There should be a space between digit and word (e.g like this 55°45′08″ North 37°36′56″ East). For some reason module adds space for some example and for some example it doesn't, see here (example no 2 & 3). --আফতাব (আলাপ) ১৭:০৩, ৯ আগস্ট ২০১৭ (ইউটিসি)উত্তর দিন
OK. I'll look at that in a day or two, and will consider your other comments above. Johnuniq (আলাপ) ১০:৩০, ১০ আগস্ট ২০১৭ (ইউটিসি)উত্তর দিন
@আফতাব: I made an edit. Let me know what else is needed. Ideally there would be a better way of handling the direction (N/S/E/W) translations but I might leave that for now if nothing more is needed. I do not know the effect of the translations in the en:Geo (microformat) output, but experiments will show any problems. Johnuniq (আলাপ) ১০:১৫, ১১ আগস্ট ২০১৭ (ইউটিসি)উত্তর দিন
Thanks, everything is working. Two things,
1) currently module uses module:Numeral converter/খেলাঘর (local convert = require( "মডিউল:Numeral converter/খেলাঘর" ).convert;) to convert en to bn digit. You said that this module isn't much efficient, can you fix that too. e.g by removing local convert then adding something like local function translate2bn(text) or can i replace module:Numeral converter/খেলাঘর with Module:ConvertDigit?
2) Before your edit, 3-4 months ago i added a function there called local function banglaChars(enChar). Is that necessary now? --আফতাব (আলাপ) ১৫:০৭, ১১ আগস্ট ২০১৭ (ইউটিসি)উত্তর দিন

@আফতাব: I edited মডিউল:স্থানাঙ্ক/খেলাঘর (Module:Coordinates/sandbox) to replace the "convert" from মডিউল:Numeral converter/খেলাঘর (Module:Numeral converter/sandbox) with a more efficient function. I do not want to clean the numeral converter module unless you can clarify exactly what is wanted. It looks as if the module is from fawiki and my guess is that almost all of the module could be omitted. The module has:

function p.convert(lang, text, signs, virgule)
  • Can signs and virgule be omitted? I think they are not relevant at bnwiki.
  • The module allows "as" + "bpy" + "glk" for lang. Are they wanted?
  • Is there a need for lang? It's simpler to have two different functions with clearer names. To me, it would be clearer to use translate2bn and translate2en because "convert" is frequently used, at least at enwiki, to convert things like feet to meters, or other similar ideas. You would know what makes more sense at bnwiki, so that's up to you.

Let me know what is wanted. Johnuniq (আলাপ) ০২:৩২, ১৩ আগস্ট ২০১৭ (ইউটিসি)উত্তর দিন

First, Thank you very much. I have almost every possible test case here and it seems everything working. So i implemented your patch.
Ya, the module is from fawiki and you're right, we don't need signs and virgule, as well as "as" + "bpy" + "glk". You can use translate2bn and translate2en, i have no objection. After rewriting the module, could you please give some example how to call those function from another module? (Currently i do this: i call from another module using local convert = require( "মডিউল:Numeral converter/খেলাঘর" ).convert;, then i use convert("bn",.......) to convert en to bn and convert("en",.......) to convert bn to en where needed) --আফতাব (আলাপ) ১৫:০৪, ১৩ আগস্ট ২০১৭ (ইউটিসি)উত্তর দিন

@আফতাব: I updated মডিউল:Numeral converter/খেলাঘর.It needs testing, but I think the comments I put at the top are correct. Examples:

  • {{#invoke:numeral converter/খেলাঘর|translate2bn|1234}} → ১২৩৪
  • {{#invoke:numeral converter/খেলাঘর|translate2en|১২৩৪}} → 1234
  • {{#invoke:numeral converter/খেলাঘর|convert_template|bn|1234}} → ১২৩৪
  • {{#invoke:numeral converter/খেলাঘর|convert_template|en|১২৩৪}} → 1234

Johnuniq (আলাপ) ০৩:৫১, ১৫ আগস্ট ২০১৭ (ইউটিসি)উত্তর দিন

Thank you very much. আফতাব (আলাপ) ১৯:১০, ১৫ আগস্ট ২০১৭ (ইউটিসি)উত্তর দিন


@আফতাব: I just discovered something new:

  • {{formatnum:১২৩৪|R}} → 1234

That came up at en:Module talk:WikidataIB#Trying to use on sawiki. Also see en:Template talk:Time ago#Sawiki error for a trick using "xnU" with formatDate in a module. Johnuniq (আলাপ) ০৯:১২, ২ এপ্রিল ২০১৮ (ইউটিসি)উত্তর দিন

@Johnuniq: I knew this. but it's not very helpful when we need to convert number & month at the same time, That's why i usually don't use it. And Bangla wiki alreday use "xnU" for Module:TimeAgo (although i copied it from fawiki  ) --আফতাব (আলাপ) ১৪:৩২, ২ এপ্রিল ২০১৮ (ইউটিসি)উত্তর দিন

2021 সম্পাদনা

Hi, i run into a problem with this module. In short: interlanguage links will move to on the top of the page. If we do nothing it will broke coordinates display here on bnwiki. MW developer recommended to use indicator extension. So, i applied this to bnwiki, it fixes the problem. But i run into following problem: coord2text function stopped working with display=title (it works with display=title,inline or display=inline but not with display=title). See টেমপ্লেট:Coord/sandbox#2021 test. I think we need to fix this line (note: this part isn't same as enwiki. you rewrote that part for bnwiki). Please help me to fix it. Feel free to edit মডিউল:স্থানাঙ্ক/খেলাঘর. Thank you. --আফতাবুজ্জামান (আলাপ) ০০:৫৬, ৫ জুন ২০২১ (ইউটিসি)উত্তর দিন

@আফতাবুজ্জামান: I gather that the problem is that at Template:Coord/sandbox the following line displays nothing:
{{#invoke:স্থানাঙ্ক/খেলাঘর|coord2text|{{Coord|57|18|22|N|4|27|32|E|display=title}}|lat}}
That is what it should do because display=title displays the coordinates only at the top of the page. Find a sandbox which has no coordinates displayed. Edit the page and replace all the content with the above, then preview. The page will display nothing but you will see the following in the indicator area at top-right:
স্থানাঙ্ক: ৫৫.৭৫২২২২° উত্তর ৩৭.৬১৫৫৫৬° পূর্ব
Perhaps I'm not understanding the issue. If so, please explain. Johnuniq (আলাপ) ০৫:০৮, ৫ জুন ২০২১ (ইউটিসি)উত্তর দিন
Yes, {{Coord|57|18|22|N|4|27|32|E|display=title}} or {{Coord|57|18|22|N|4|27|32|E|display=inline,title}} both are working correctly. It's the coord2text function which is not working correctly. coord2text should extract the longitudine and latitudine from coord template. It shouldn't display coordinates at the top of the page. Please see en:User talk:আফতাবুজ্জামান/sandbox. But here:
  • {{#invoke:স্থানাঙ্ক/খেলাঘর|coord2text|{{Coord|57|18|22|N|4|27|32|E|display=title}}|lat}} gives nothing & shows coordinates at the top of the page
  • {{#invoke:স্থানাঙ্ক/খেলাঘর|coord2text|{{Coord|57|18|22|N|4|27|32|E|display=inline,title}}|lat}} gives 57.30611 & shows coordinates at the top of the page
Both example should give 57.30611 and shouldn't display coordinates at the top of the page. I found similar problem with মডিউল:অবস্থান_মানচিত্র/খেলাঘর#L-165 (Module:Location map, testcases). Both (coord & location map) module uses same regex. I think regex is broken because of my changes to include indicator. --আফতাবুজ্জামান (আলাপ) ১৭:০৬, ৫ জুন ২০২১ (ইউটিসি)উত্তর দিন

@আফতাবুজ্জামান: Bad news: the "indicator" tag causes the title coordinates to be displayed as soon as args[1] is read. To demonstrate, preview a sandbox at enwiki after replacing the contents with the following.

{{#invoke:string|len|<indicator name="coordinates">Hello</indicator>}}

That displays 37 and shows "Hello" in the indicator area. The indicator tag is replaced with a strip marker. The following shows that except that I replaced the first and last characters with 'X'.

X'"`UNIQ--indicator-00000001-QINU`"'X

The length of the strip marker is 37 bytes.

For further evidence, see my sandbox here: User:Johnuniq/খেলাঘর. You can replace all the contents of Module:স্থানাঙ্ক/খেলাঘর with the following:

local p = {}
function p.coord2text(frame)
	local coord = frame.args[1]
	return 'Dummy'
end
return p

and preview with User:Johnuniq/খেলাঘর

I don't think a workaround will be possible. Johnuniq (আলাপ) ১০:০৭, ৬ জুন ২০২১ (ইউটিসি)উত্তর দিন

By the way, you can repeat the preview with the following to see that the module receives a strip marker.

local p = {}
local dump = require('Module:Dump')._dump
function p.coord2text(frame)
	return dump(frame.args[1])
end
return p

Johnuniq (আলাপ) ১০:৪৮, ৬ জুন ২০২১ (ইউটিসি)উত্তর দিন

Oh. Thanks for testing. I will ask on en:Wikipedia talk:Lua to see if anyone has any idea how to fix it. Thanks again. --আফতাবুজ্জামান (আলাপ) ২১:৪৩, ৬ জুন ২০২১ (ইউটিসি)উত্তর দিন

2021 problem সম্পাদনা

@আফতাবুজ্জামান: I saw your example at en:WT:Lua, namely that মাতা আর্মেনিয়া is displaying an error. Edit that page, replace its contents with the following, and preview.

Test 1
{{Infobox Historic Site
| locmapin = আর্মেনিয়া
| coordinates =
}}

Test 2
{{Infobox Historic Site
| locmapin = আর্মেনিয়া
| coordinates ={{coord|40|11|42.90|N|44|31|29.34|E|type:landmark_region:AM|display=title}}
}}

Test 3
{{Infobox Historic Site
| locmapin = আর্মেনিয়া
| coordinates = <span class="visualhide">40.1952500°N 44.5248167°E</span>
}}

You will see that Test 1 works because coordinates is empty so the infobox uses the Wikidata entry to get the coordinates. Tests 2 gives the error because it provides text for coordinates yet that text cannot be used to extract the coordinate values. Test 3 works because it includes hidden text that can be used to extract coordinate values. Therefore, a solution might be to modify Template:Coord so that it always outputs the coordinate values in a hidden format, after the indicator tag. The code handling coordinates might have to ignore the strip marker from coord. Does this look achievable? Johnuniq (আলাপ) ০০:৩৯, ৮ জুন ২০২১ (ইউটিসি)উত্তর দিন

The good news is that the problem is not due to an issue in the modules at bnwiki. It is a fundamental problem with the fact that the new indicator tag generates a strip marker which cannot be interpreted by coord2text. That means the issue will need to be addressed at enwiki in due course. I'll think some more and might ask at enwiki. Johnuniq (আলাপ) ০৫:১৭, ৮ জুন ২০২১ (ইউটিসি)উত্তর দিন
See en:Template talk:Coord#Use page indicators?. Johnuniq (আলাপ) ১০:৩১, ৮ জুন ২০২১ (ইউটিসি)উত্তর দিন
I think, for now i will just add "inline" (like this) to fix this problem. And as you said "the issue will need to be addressed at enwiki in due course", i will closely follow how enwiki decide to fix that. If enwiki finds any solution, you can then help me to adapt that for bnwiki. For now don't worry about bnwiki. Thank you :) --আফতাবুজ্জামান (আলাপ) ১৯:৩০, ৮ জুন ২০২১ (ইউটিসি)উত্তর দিন

NUMBEROF সম্পাদনা

@আফতাব: I'm working on a module to implement en:Template:NUMBEROF, namely en:Module:NUMBEROF. It uses data from a page at Commons in the Data: namespace. There's nothing for you to see, but if you wanted to read the background, it's at en:Template talk:NUMBEROF#Overhead. I'm pinging you here to let you know that I am creating some pages to see how the module performs on another Wikipedia. You may never want to use it because you have a working system, but I'm hoping to check the module's operation even if it's never used here.

Johnuniq (আলাপ) ০৪:৫৭, ৭ মে ২০২০ (ইউটিসি)উত্তর দিন

Here is a quick test.
  • {{NUMBEROF/খেলাঘর|edits|en}} → 1214918258
  • {{NUMBEROF/খেলাঘর|edits|bn}} → 7327582
  • {{NUMBEROF/খেলাঘর|edits|en|N}} → ১,২১,৪৯,১৮,২৫৮
  • {{NUMBEROF/খেলাঘর|edits|bn|N}} → ৭৩,২৭,৫৮২
  • {{NUMBEROF/খেলাঘর|depth|en}} → 1245
  • {{NUMBEROF/খেলাঘর|depth|bn}} → 304
  • {{NUMBEROF/খেলাঘর|depth|en|N}} → ১,২৪৫
  • {{NUMBEROF/খেলাঘর|depth|bn|N}} → ৩০৪
Johnuniq (আলাপ) ০৭:২৬, ৭ মে ২০২০ (ইউটিসি)উত্তর দিন
Hello Johnuniq. I changed my username from "Aftabuzzaman" to "আফতাবুজ্জামান", that's why i didn't got your ping in time. I can see it was already implemented here by user:GreenC and everything is working correctly. Thank you both of you. --আফতাবুজ্জামান (আলাপ) ০০:১৯, ১৮ মে ২০২০ (ইউটিসি)উত্তর দিন

Module:Age সম্পাদনা

en:Module:Age মডিউল:বয়স
en:Module:Age/sandbox মডিউল:বয়স/খেলাঘর
en:Module:Date মডিউল:তারিখ
en:Module:Date/sandbox মডিউল:তারিখ/খেলাঘর
en:Template:Age টেমপ্লেট:বয়স
en:Template:Age/sandbox টেমপ্লেট:বয়স/খেলাঘর
{{Age}} tests টেমপ্লেট:বয়স/পরীক্ষা পাতা
en:Template:Age in years, months and days টেমপ্লেট:বছর, মাস ও দিনে বয়স
en:Template:Age in years, months and days/sandbox টেমপ্লেট:বছর, মাস ও দিনে বয়স/খেলাঘর
{{Age in years, months and days}} tests টেমপ্লেট:মৃত্যু তারিখ ও বয়স/পরীক্ষা পাতা
en:Template:Birth date and age টেমপ্লেট:জন্ম তারিখ ও বয়স
en:Template:Birth date and age/sandbox টেমপ্লেট:জন্ম তারিখ ও বয়স/খেলাঘর
{{Birth date and age}} tests টেমপ্লেট:জন্ম তারিখ ও বয়স/পরীক্ষা পাতা
en:Template:Death date and age টেমপ্লেট:মৃত্যু তারিখ ও বয়স
en:Template:Death date and age/sandbox টেমপ্লেট:মৃত্যু তারিখ ও বয়স/খেলাঘর
{{Death date and age}} tests টেমপ্লেট:মৃত্যু তারিখ ও বয়স/পরীক্ষা পাতা

@আফতাবুজ্জামান: I'm working on providing better localization for en:Module:Age. Are you able to do some tests on the sandbox module which I just created, মডিউল:বয়স/খেলাঘর? Is there a sandbox template for birth date and age and death date and age which calls the sandbox module? The most drastic change concerns how these are handled. It should be ok but testing is needed. There is a request at en:Module talk:Age#PLURAL support to allow plural names for bswiki. I think you don't need that but I'm also adding more localization so it would be good if you could try it. I'm putting this on my talk page so I can find it later. Johnuniq (আলাপ) ০৭:১৫, ১৭ এপ্রিল ২০২১ (ইউটিসি)উত্তর দিন

Thank you. Yes, here are the sandboxes:
&
Everything looks correct (same as previous). --আফতাবুজ্জামান (আলাপ) ১৭:৪৮, ১৭ এপ্রিল ২০২১ (ইউটিসি)উত্তর দিন
Found a problem with Template:Age (See test testcases টেমপ্লেট:বয়স/পরীক্ষা পাতা) & with Template:Age in years, months and days (see test cases টেমপ্লেট:বছর, মাস ও দিনে বয়স/পরীক্ষা পাতা). --আফতাবুজ্জামান (আলাপ) ১৮:২৮, ১৭ এপ্রিল ২০২১ (ইউটিসি)উত্তর দিন
@আফতাবুজ্জামান: Thanks for looking. That was a blunder easily fixed. Please check now. By the way, I will be making a couple more changes for bswiki so I'll ask you to check that everything is ok again soon. Johnuniq (আলাপ) ০৭:৩১, ১৮ এপ্রিল ২০২১ (ইউটিসি)উত্তর দিন
Ok. -- আফতাবুজ্জামান (আলাপ) ১৮:০০, ১৮ এপ্রিল ২০২১ (ইউটিসি)উত্তর দিন

@আফতাবুজ্জামান: I have finished work on localizing Module:Age/sandbox. Please use মডিউল:বয়স/খেলাঘর to update the main module and let me know if any problems arise. Johnuniq (আলাপ) ০৩:২৯, ২০ এপ্রিল ২০২১ (ইউটিসি)উত্তর দিন

Done. Thank you. I checked every template. Didn't find any error. I will let you know if i find any. --আফতাবুজ্জামান (আলাপ) ০২:১৭, ২১ এপ্রিল ২০২১ (ইউটিসি)উত্তর দিন
Thanks, you are very efficient. Johnuniq (আলাপ) ০২:৫৪, ২১ এপ্রিল ২০২১ (ইউটিসি)উত্তর দিন

[Wikimedia Foundation elections 2021] Candidates meet with South Asia + ESEAP communities সম্পাদনা

Hello,

As you may already know, the 2021 Wikimedia Foundation Board of Trustees elections are from 4 August 2021 to 17 August 2021. Members of the Wikimedia community have the opportunity to elect four candidates to a three-year term. After a three-week-long Call for Candidates, there are 20 candidates for the 2021 election.

An event for community members to know and interact with the candidates is being organized. During the event, the candidates will briefly introduce themselves and then answer questions from community members. The event details are as follows:

  • Bangladesh: 4:30 pm to 7:00 pm
  • India & Sri Lanka: 4:00 pm to 6:30 pm
  • Nepal: 4:15 pm to 6:45 pm
  • Pakistan & Maldives: 3:30 pm to 6:00 pm
  • Live interpretation is being provided in Bangla and Hindi.
  • Please register using this form

For more details, please visit the event page at Wikimedia Foundation elections/2021/Meetings/South Asia + ESEAP.

Hope that you are able to join us, KCVelaga (WMF), ০৬:৩৩, ২৩ জুলাই ২০২১ (ইউটিসি)উত্তর দিন

উইকিমিডিয়া ফাউন্ডেশন নির্বাচন ২০২১ সম্পাদনা

সুপ্রিয় Johnuniq,
২০২১ সালের ট্রাস্টি বোর্ড নির্বাচনের ভোটদান শুরু হয়েছে যা ৩১শে আগস্ট পর্যন্ত চলবে। সম্প্রদায়ের প্রার্থীদের তাদের প্রার্থীতা জমা দিতে বলা হয়েছিল। তিন সপ্তাহ ধরে প্রার্থীদের আহ্বানের পর ২০২১ সালের নির্বাচনে ১৯ জন প্রার্থী রয়েছেন

উইকিমিডিয়া সম্প্রদায়ের নিকট ভোটদানের মাধ্যমে আগামী তিন বছরের মেয়াদে উইকিমিডিয়া আন্দোলনের জন্য গুরুত্বপূর্ণ এবং ট্রাস্টি বোর্ডের চাহিদা পূরণ করতে সক্ষম প্রার্থীদের নির্বাচিত করার সুযোগ রয়েছে। প্রার্থীদের সম্পর্কে জানুন এবং আপনার পছন্দের প্রার্থীকে ভোটদান করুন। ট্রাস্টি হিসেবে কাজ করার জন্য নির্বাচন কমিটি সবচেয়ে বেশি ভোট প্রাপ্ত চারজন প্রার্থীকে নির্বাচন করবে। কীভাবে ভোট দিবেন তা জানতে এই পাতাটি পড়ুন।

নির্বাচন কমিটির পক্ষে,
শাকিল হোসেননেট্টিমি সুজাতা ০২:২৩, ১৮ আগস্ট ২০২১ (ইউটিসি)উত্তর দিন

উইকিমিডিয়া ফাউন্ডেশন ট্রাস্টি বোর্ড নির্বাচন ২০২১-এ ভোট দিতে ভুলবেন না সম্পাদনা

সুপ্রিয় Johnuniq,

আপনাকে এই বার্তা প্রেরণ করা হয়েছে কারণ আপনি ২০২১-এর উইকিমিডিয়া ফাউন্ডেশন ট্রাস্টি বোর্ড নির্বাচনে ভোটদানের উপযুক্ত। নির্বাচনটি ১৮ই আগস্ট, ২০২১ তারিখে শুরু হয়েছে এবং এটি ৩১শে আগস্ট, ২০২১ পর্যন্ত চলবে। উইকিমিডিয়া ফাউন্ডেশন বাংলা উইকিপিডিয়া টির মত প্রকল্প পরিচালনা করে এবং ফাউন্ডেশন একটি ট্রাস্টি বোর্ডের মাধ্যমে পরিচালিত হয়। ট্রাস্টি বোর্ড উইকিমিডিয়া ফাউন্ডেশনের সিদ্ধান্তগ্ৰহণকারী সংস্থা। ট্রাস্টি বোর্ড সম্পর্কে আরও জানুন

এই বছর সম্প্রদায়ের ভোটদানের মাধ্যমে চারটি আসন নির্বাচিত করতে হবে। বিশ্বজুড়ে ১৯ জন প্রার্থী এই আসনগুলিতে প্রতিদ্বন্দিতা করেছেন। ২০২১ সালের ট্রাস্টি বোর্ড নির্বাচনের প্রার্থীদের সম্পর্কে আরও জানুন

সম্প্রদায়গুলোর প্রায় ৭০,০০০ সদস্যকে ভোট দিতে বলা হয়েছে এবং এর মধ্যে আপনিও রয়েছেন! ভোট দান ৩১ আগস্ট ২৩:৫৯ ইউটিসি পর্যন্ত চলবে তাই বাংলা উইকিপিডিয়া এর সিকিউরপোল-এ যান ও আপনার ভোটাধিকার প্রয়োগ করুন।

আপনি যদি ইতিমধ্যে ভোট দিয়ে থাকেন তাহলে এই বার্তা টি উপেক্ষা করুন এবং ভোট দেওয়ার জন্য আপনাকে ধন্যবাদ। একজন ব্যক্তি একাধিক অ্যাকাউন্ট ব্যবহার করলেও একবারই ভোট দিতে পারবে।

নির্বাচন সম্পর্কে আরও জানুনMediaWiki message delivery (আলাপ) ০৬:২৩, ২৮ আগস্ট ২০২১ (ইউটিসি)উত্তর দিন

Module:Navseasoncats সম্পাদনা

Hello John, Could you please help me to fix Module:Navseasoncats/খেলাঘর? As usual, module doesn't understand Bengali numeral and gives error. A user tried to fix it but didn't able to (see বিষয়শ্রেণী:১৯৮০-এর দশকের পুরস্কার). On fawiki, they are able to fix it but i couldn't make it work on bnwiki.

I am not wanting you fix the whole module right now. Here i setup a test page. Could you please make it work so that the test page will output something and if possible in Bengali digit. -- আফতাবুজ্জামান (আলাপ) ০০:১৫, ১৭ মার্চ ২০২২ (ইউটিসি)উত্তর দিন

One problem is that en:Module:ConvertNumeric exports function english_to_numeral but Module:ConvertNumeric does not. That causes Module:Navseasoncats/খেলাঘর to fail when it uses:
local eng2num = require('Module:ConvertNumeric').english_to_numeral
I'll look some more another time. Johnuniq (আলাপ) ০৮:৫০, ১৭ মার্চ ২০২২ (ইউটিসি)উত্তর দিন
I updated the code for Module:ConvertNumeric from enwiki. -- আফতাবুজ্জামান (আলাপ) ২২:২১, ১৭ মার্চ ২০২২ (ইউটিসি)উত্তর দিন
I've finished patching Module:Navseasoncats/খেলাঘর to make it work for the tests at মডিউল আলাপ:Navseasoncats/test. They all work although you have to delete half of them to see that the others work because the module tests whether pages exist and that gives too many expensive calls. I suspect a better method of fixing the module should be used. That might involve translating all bn digits in the input to en digits, before doing anything else. Then let the original module work on the en digits. Then translate the en digits in the result to bn. More work would be need to handle the en words that are built-in to the module. Johnuniq (আলাপ) ০৯:০৬, ১৮ মার্চ ২০২২ (ইউটিসি)উত্তর দিন
I should clarify that by "work" I mean they run without errors. I can see that they output en digits and that is not wanted. I might try my above idea about doing the translations before and after the functions in the original module. Johnuniq (আলাপ) ০৯:৪০, ১৮ মার্চ ২০২২ (ইউটিসি)উত্তর দিন

It is too hard to localize modules like Navseasoncats, and to do it for other modules, so I'm trying my plan to make a wrapper that will at least translate digits before and after calling a module. My hope is that this will work well enough and require minimal changes to a module copied from enwiki. A benefit would be that if a new copy of the enwiki module is used, it will be easy to change it.

Johnuniq (আলাপ) ০২:৪০, ১৯ মার্চ ২০২২ (ইউটিসি)উত্তর দিন

I gave up trying to make the wrapper completely general. It should now handle the common case of a template invoking a module with the only parameters being those passed to the template in wikitext. It's rushed and I will need to check it later. The tests all work although you can't see all them at once due to the "too many expensive function calls" errors. @ আফতাবুজ্জামান: Do the results look ok? I'll be back in a day or two for more. Johnuniq (আলাপ) ০৯:৫৮, ১৯ মার্চ ২০২২ (ইউটিসি)উত্তর দিন
We need to fix following:
1. Module isn't producing any blue link even if page exists. I updated মডিউল আলাপ:Navseasoncats/test with some real page name.
2. We need to fix regex.
- If i remove last %s from মডিউল:Navseasoncats/খেলাঘর#L-1704 everything start working on test page.
- I think মডিউল:Navseasoncats/খেলাঘর#L-1701 looks for decade e.g. 2010s. For bnwiki we need a regex for 3 cases e.g. 2010-এর দশ or 2010-এর দশকে (কে = ক + ে) or 2010-এর দশকের. Think it as 2010-er doshok or 2010-er doshoke or 2010-er doshoker . I think we need a regex like [:%s](%d+%-এর দশক?ে?র?)[%s-] ([:%s](%d+%-er doshok?e?r?)[%s-]). However my regex doesn't work. -- আফতাবুজ্জামান (আলাপ) ০৩:১৭, ২০ মার্চ ২০২২ (ইউটিসি)উত্তর দিন
I'll think about all that. I was trying to avoid making a hundred changes to Module:Navseasoncats because that's difficult and because future updates become extremely difficult. However, I am now seeing problems that require changes to the module. Current testing uses the testcase=xxx parameter, but without that, the module uses mw.title.getCurrentTitle and uses the title of the current page. That title needs to be translated. Those dosho/k/ke/ker variations can possibly be handled by translating the first few characters of that text because it is the same for all three. I'll return in a day or two. Johnuniq (আলাপ) ০৮:০৪, ২০ মার্চ ২০২২ (ইউটিসি)উত্তর দিন
This is going to take a few more days. I'm trying to make the minimum number of changes to Module:Navseasoncats but it needs a lot of tweaking. There are dozens of places where very awkward localization would be needed. More later. Johnuniq (আলাপ) ০৯:২৫, ২৩ মার্চ ২০২২ (ইউটিসি)উত্তর দিন

I saw you created Module:Navseasoncats/translate. I think may be following table will help you:

Suffix Bengali
decade 2010-er doshok ... -er doshok -এর দশক
2010-er doshoke ... -er doshoke -এর দশকে
2010-er doshoker ... -er doshoker -এর দশকের
year 2010-er ... -er -এর
2010-e ... -e -এ
2010 ...

--আফতাবুজ্জামান (আলাপ) ০০:৪১, ২৪ মার্চ ২০২২ (ইউটিসি)উত্তর দিন

I'm still working on this! I've been trying things and wondering what to do. I have also started tweaking en:Module:Navseasoncats/sandbox so the enwiki and bnwiki modules will end up being the same except for the localization. Johnuniq (আলাপ) ০৪:৩০, ২৯ মার্চ ২০২২ (ইউটিসি)উত্তর দিন
@আফতাবুজ্জামান: Please examine the current results at Module talk:Navseasoncats/test and let me know about any problems. It is too hard to fix the entire module for problems that might occur. Instead, I propose fixing problems as they become known. Template:Navseasoncats invokes মডিউল:Navseasoncats/খেলাঘর (Module:Navseasoncats/sandbox). Please find some failures and work out an example which makes that template fail. Post some examples on a page using wikitext like {{navseasoncats|testcase=১৯৫০-এ জন্ম}}. Also, say what is wrong and what is wanted. It would be ok to use nowiki or pre tags to stop the template from running. I can preview an edit to see what occurs. Johnuniq (আলাপ) ০৬:১৮, ৩০ মার্চ ২০২২ (ইউটিসি)উত্তর দিন
Please see Module talk:Navseasoncats/test (Problem 1 & Problem 2). -- আফতাবুজ্জামান (আলাপ) ০১:৪৮, ৩১ মার্চ ২০২২ (ইউটিসি)উত্তর দিন
Regarding problem 1, let's put that on the wishlist for after errors are fixed. One reason for that is that it is not yet sure that the module can be fixed with a reasonable amount of effort. I want to focus on errors that are happening.
Regarding problem 2, in the future I would much prefer to see {{navseasoncats|testcase=১৯৫০-এ জন্ম}} rather than {{Navseasoncats/পরীক্ষা পাতা|testcase=১৯৫০-এ জন্ম}} which transcludes a test page that I would have to edit in order to be certain of what wikitext it contained. I'll have a look at problem 2 soon. Johnuniq (আলাপ) ০৪:২৮, ৩১ মার্চ ২০২২ (ইউটিসি)উত্তর দিন
I think I have fixed problem 2. Please tell me if the result is correct. Johnuniq (আলাপ) ০৬:৩৩, ৩১ মার্চ ২০২২ (ইউটিসি)উত্তর দিন
Looking at the code, I think there must be some enwiki categories like "Something in 1950" which has the number 1950 followed by nothing. Can that occur here? For example, could a year category end in "১৯৫০"? Or would it end with "১৯৫০-এ"? Johnuniq (আলাপ) ০৬:৪৮, ৩১ মার্চ ২০২২ (ইউটিসি)উত্তর দিন
Yes, a year category could end/start in/with "১৯৫০" without any -এ or -এর. E.g. category:২০১২ গ্রীষ্মকালীন অলিম্পিক (2012 summer olympic), category:দেশ অনুযায়ী ২০১৯ (2019 by country). Right now, module is handling the year correctly.
Please see Module talk:Navseasoncats/test (Problem 3 & Problem 4). -- আফতাবুজ্জামান (আলাপ) ০০:১২, ১ এপ্রিল ২০২২ (ইউটিসি)উত্তর দিন
Problem 4 is resolved. Problem 2 partially returned. Example 4 & 7 on test page aren't giving correct result. In both case, the module is treating the year as decade.
  • 2010-er doshok ... (this is a decade, decade always has the word "-er dosho/k/ke/ker")
  • 1994-er ... (this is a year, year sometime has "-er", sometime "-e", sometime without any suffix)
As you can see, in the above example both decade and year has -er (-এর). I think we should look for "-er dosho/k/ke/ker" to make sure we are in a decade category. -- আফতাবুজ্জামান (আলাপ) ১৫:৩৬, ১ এপ্রিল ২০২২ (ইউটিসি)উত্তর দিন
This is going to require some serious thought. I just made a simple change to Module:Navseasoncats/translate. Did it help with examples 4 and 7? Did it break anything? I'll take a couple of days to get some time to think. Johnuniq (আলাপ) ০৬:৫৪, ২ এপ্রিল ২০২২ (ইউটিসি)উত্তর দিন
Yes, it worked and didn't break anything. -- আফতাবুজ্জামান (আলাপ) ১৭:৫৬, ২ এপ্রিল ২০২২ (ইউটিসি)উত্তর দিন
I think it now works for year/decade when the year starts the category. I'll look at the more complex case of when there is text before the year later. I need to collect relevant information for the {{Navseasoncats|testcase=দেশ অনুযায়ী ২০১৯}} example. That is, what are the names of the existing year categories and the existing decade categories which that example should show. Please check the previous problems and confirm that they still work, and that problem 3 is at least partially fixed. There is now a red "Navseasoncats year and decade" category on the test page. We can worry about what categories should be used and their names later. Johnuniq (আলাপ) ০৯:৩৭, ৪ এপ্রিল ২০২২ (ইউটিসি)উত্তর দিন
Yes, it works for year/decade when the year starts the category. Previous problems didn't returned (that is, the module is treating decade as decade and year as year) and problem 3 is partially fixed. For {{Navseasoncats|testcase=দেশ অনুযায়ী ২০১৯}} (2019), existing year categories are:
- category:দেশ অনুযায়ী ২০১৮ (2018), category:দেশ অনুযায়ী ২০১৯ (2019), category:দেশ অনুযায়ী ২০২০ (2020), category:দেশ অনুযায়ী ২০২১ (2021) etc
and existing decade categories are:
- category:দেশ অনুযায়ী ২০১০-এর দশক (2010s), category:দেশ অনুযায়ী ২০২০-এর দশক (2020s) etc. -- আফতাবুজ্জামান (আলাপ) ১৭:১২, ৪ এপ্রিল ২০২২ (ইউটিসি)উত্তর দিন
Two more problem: Module:Navseasoncats/খেলাঘর#L-207 gets translated to Bengali and please see Module talk:Navseasoncats/test (example 8 & 9). -- আফতাবুজ্জামান (আলাপ) ০১:১৭, ৫ এপ্রিল ২০২২ (ইউটিসি)উত্তর দিন
I noticed the bug that numbers in span tags are being translated. However I found that the translations seemed to work so I did not bother proceeding with a plan I had for avoiding translating in spans. I can look at that again if necessary and I agree that even if it currently works it's undesirable. Johnuniq (আলাপ) ০৪:৩৪, ৫ এপ্রিল ২০২২ (ইউটিসি)উত্তর দিন
Ok, we can fix it later. In the meantime as a workaround, i think we can use #AAA . -- আফতাবুজ্জামান (আলাপ) ০৪:৪৯, ৫ এপ্রিল ২০২২ (ইউটিসি)উত্তর দিন
I think I fixed the translation problem. Johnuniq (আলাপ) ০৭:৫৬, ৬ এপ্রিল ২০২২ (ইউটিসি)উত্তর দিন

@আফতাবুজ্জামান: I fixed a couple of things but it is very complicated and a lot of testing will be needed. Please clean up Module talk:Navseasoncats/test using the headings that I just inserted to organize the page. I would like all the examples with correct results in the first section. They will be needed as tests to confirm that future changes don't break what previously worked. If any working examples have been removed, please add them back. If there are too many of them and template limits give problems, put them in pre tags so they do not function. I at least want a record of the tests for checking later. Any redundant notes can be removed. I'll look at some more problems in due course. Johnuniq (আলাপ) ১০:৩০, ৯ এপ্রিল ২০২২ (ইউটিসি)উত্তর দিন

Regarding Problem 1/feature request: Currently, {{Navseasoncats|testcase=১৯৮০-এর দশকে বাংলাদেশ}} (1980s in Bangladesh) displays ১৯৮০ for the 1980s (no link) and ১৯৯০ for the 1990s (with link).
Are you saying that the 1980s item should display ১৯৮০-এর দশকে and the 1990s display should be unchanged? And, the display for example 3 would also be unchanged. That is, example 3 would continue to show ১৯৫০ for the current decade in the second line? Johnuniq (আলাপ) ০৫:০৮, ১০ এপ্রিল ২০২২ (ইউটিসি)উত্তর দিন
Problems 8 and 9 were due to a simple blunder, now fixed. However the test page is giving "too many expensive function calls". I'm not sure what to do because the working tests are very desirable for checking future work, and there should be more. We want to avoid having too many pages to check but I'm wondering if moving the correct results to numbered subpages would be desirable. Something like Navseasoncats/test/correct/1 and Navseasoncats/test/correct/2 and perhaps more if needed. What do you think? Johnuniq (আলাপ) ০৭:৪৭, ১০ এপ্রিল ২০২২ (ইউটিসি)উত্তর দিন
I would like to have it for both cases. Please see মডিউল আলাপ:Navseasoncats/test#Incorrect or only partially correct results for examples. Regardless of decade's category title, it should display [dddd]-এর দশক ([dddd]-er doshok), not দশকে (দশকে doshoke = দশক doshok + এ e = roughly translate to decade in). In other word, I would like [[1980 decade in Bangladesh|1980 decade]] and not [[1980 decade in Bangladesh|1980 decade in]]. 1980s item should display ১৯৮০-এর দশক and example 3 should display ১৯৫০-এর দশক.
I moved all the correct results to Module talk:Navseasoncats/test/correct/1. If you want them in a template namespace, that would be also ok.
I found a problem which also exist on enwiki (don't know if it is intentional or bug). Go to e.g. en:Category:1920 films using an actual mobile device. Instead of Navseasoncats box showing up, there is nothing & a big blank space showing. -- আফতাবুজ্জামান (আলাপ) ০২:৫৩, ১১ এপ্রিল ২০২২ (ইউটিসি)উত্তর দিন
The module is very complicated and I am unable to properly test the many functions that it can perform. I'm sure that problems will arise that need to be handled one at a time. However, I have made a change which does what I think you want to display the decades text on the central element. Please check all the correct and incorrect examples and confirm if they work. The mobile view has many differences from the desktop view. en:WP:NAVBOX says that navboxes are not displayed on mobile, see phab:T124168. Johnuniq (আলাপ) ১০:০১, ১১ এপ্রিল ২০২২ (ইউটিসি)উত্তর দিন
I did some testing, looks like mobile view problem get fixed if we remove max-width: calc(100% - 25em) from Module:Navseasoncats/খেলাঘর#L-404.
Regarding [dddd]-er doshok, yes, it worked. I think, you have fixed all of common cases. There are some categories for ordinal, to fix that you have to rewrite Module:ConvertNumeric (so, maybe later). Please add translations to /translate page for season (মৌসুম), series (ধারাবাহিক), century (শতাব্দী).
There are so many tracking categories. Is it possible to disable all of them and only keep three (Navseasoncats failed to generate navbox, Navseasoncats range ends (blank, MOS), & Navseasoncats isolated)? -- আফতাবুজ্জামান (আলাপ) ০৩:০৭, ১২ এপ্রিল ২০২২ (ইউটিসি)উত্তর দিন
Regarding mobile view: Let's start with a test to investigate what happens when max-width: calc(100% - 25em) is omitted. I have put some temporary code in the module so adding |cat=NOMAX to the template will remove the max-width item. You can check that in Special:ExpandTemplates for example by inserting Category:২০০০-এ বাংলাদেশ under "Context title" and inserting {{navseasoncats}} or {{navseasoncats|cat=NOMAX}} under "Input wikitext". Put each of them on two sandbox pages (with |testcase=Category:২০০০-এ বাংলাদেশ) and see what mobile view shows. I'll look at the other points in a day or two. Johnuniq (আলাপ) ১০:১৯, ১২ এপ্রিল ২০২২ (ইউটিসি)উত্তর দিন
I temporary added that (with & without NOMAX) on Category:২০০০-এ বাংলাদেশ (will revert my edit later). Now i can see the {{Navseasoncats}} output from my mobile. max-width: calc is the problem, don't know why it doesn't work on mobile. Let's remove max-width: calc(100% - 25em) from Module:Navseasoncats/খেলাঘর#L-404 for bnwiki. -- আফতাবুজ্জামান (আলাপ) ০২:৪৪, ১৩ এপ্রিল ২০২২ (ইউটিসি)উত্তর দিন
Yes, I'll do that. I can't see any benefit from max-width but perhaps it's helpful on a super-wide screen? Anyway it's easy to put back if needed. Johnuniq (আলাপ) ০৫:০২, ১৩ এপ্রিল ২০২২ (ইউটিসি)উত্তর দিন
I removed max-width and the cat=NOMAX test, and disabled some unwanted tracking categories. I temporarily kept 'year and decade' and 'decade and century' as pages in those categories will need checking (everything needs checking but these categories are two that are common and that I hope to fix). I added translations for century, season, series but these will probably need more before they fully work.
Before removing max-width I used a desktop computer to view Category:২০০০-এ বাংলাদেশ using the desktop view. Dragging the window width to make it very narrow showed that the first navbox (with max-width) became very tall until there was only room to show one year (four digits). Repeating this after switching to mobile view showed that the width of the navbox shrank until only one digit could be seen. Reducing the width then hid that single digit which showed a large blank box. I don't know what controls that, but that's why you saw a blank box on mobile. Johnuniq (আলাপ) ০৭:৪৪, ১৫ এপ্রিল ২০২২ (ইউটিসি)উত্তর দিন
- Both season, series are working.
- For century, we need to fix Module:Navseasoncats/খেলাঘর#L-1743. In regex i would write something like this: ([0-9]+)(ম|য়|র্থ|ষ্ঠ|শ) (see table on মডিউল আলাপ:Navseasoncats/test page). This will match e.g. 1ম (1st), 2য় (2nd), 4র্থ (4th), 10ম (10th), 11শ (11th), 22শ (22nd) etc. I don't know how to convert this to lua regex. I tried some months ago for another template but failed.
- For ordinal, we have to rewrite Module:ConvertNumeric. For bnwiki, current code won't give correct result after 19. If you are interested, i can write all the details about ordinal and then if it is easy to implement, you can work on it or leave it if it is very complicated.
- Should i add translations for categories directly to the module or '/translate' page?
Apart from ordinal and century, i think Module:Navseasoncats is ready to use. I also asked other wikipedian to test but so far don't heard anything. Also my tests are giving expected result. -- আফতাবুজ্জামান (আলাপ) ০২:৪১, ১৬ এপ্রিল ২০২২ (ইউটিসি)উত্তর দিন
I'll think about ordinals in a day or two. You put a table at Module talk:Navseasoncats/test. If that shows all the rules, it looks achievable but I would need to investigate. Put the category translations at Module:Navseasoncats/খেলাঘর#L-14 (search for catnames). There is other text you probably want to translate. I think just change the text where it is but avoid doing lots of small changes unless they really are needed. Regarding the module names, if you want to change them, please move the pages so the history is retained. Apart from being the right thing to do, that allows me to find them in my contributions and to track what changes I made. Johnuniq (আলাপ) ০৯:২২, ১৬ এপ্রিল ২০২২ (ইউটিসি)উত্তর দিন
The module will be used on lots of categories. I probably need to fully protect the module. I thought of doing something like this: I will create modules with Bengali title. I will move Module:Navseasoncats/খেলাঘর to Module:Navseasoncats (this will be our sandbox). So you don't have to remember bengali name & in future if needed, you can edit it. I will put a table on /doc to indicate which correspond to what.
Is Module:Wrapper for general use or for only this module? If later, we should move it to Module:Navseasoncats/wrapper if possible. -- আফতাবুজ্জামান (আলাপ) ০২:৪৯, ১৭ এপ্রিল ২০২২ (ইউটিসি)উত্তর দিন
Don't you have template editor rights here? I'm not really interested if my contributions are not in the history or if I can't edit the module. Module:Wrapper is intended to be for general use. I don't know if you will find it useful but it should provide a way to localize a simple module which just needs digits and a small number of words translated. The idea is that a minimum number of changes to the target module would be needed which would make it much easier to update the module in the future. Johnuniq (আলাপ) ০৩:১৭, ১৭ এপ্রিল ২০২২ (ইউটিসি)উত্তর দিন
We don't have template editor rights yet. Ah, ok. No need to move Module:Wrapper then. -- আফতাবুজ্জামান (আলাপ) ০২:৩৪, ১৮ এপ্রিল ২০২২ (ইউটিসি)উত্তর দিন
Any update regarding ordinals? (sorry if you are busy) -- আফতাবুজ্জামান (আলাপ) ০০:১৪, ৬ মে ২০২২ (ইউটিসি)উত্তর দিন
Hi John, most probably you are busy or not interested with this anymore. Didn't heard from you for one month. That's ok. Thank you for helping me :) (i know a thank you isn't enough). আফতাবুজ্জামান (আলাপ) ১৪:৪৪, ২১ মে ২০২২ (ইউটিসি)উত্তর দিন

Module:Val সম্পাদনা

@আফতাবুজ্জামান: We talked at en:Template talk:Val#bnwiki about your Module:Val which I recently edited to translate output digits. I'm not sure if I'll do any more but I had a quick look at Module:Gapnum while thinking about the fact that bnwiki wants digits grouped 2,2,3. By default, val groups digits using gaps and it does that before and after the decimal mark. I'll use asterisks instead of gaps to demonstrate:

1*234*567.123*456*7890

That shows that the last group has four digits if necessary to avoid having a single digit after the last gap. If using fmt=commas the result would have no grouping after the decimal mark:

1,234,567.1234567890

What would be wanted at bnwiki for these two cases? Johnuniq (আলাপ) ০৩:১৬, ২৮ ডিসেম্বর ২০২৩ (ইউটিসি)উত্তর দিন

For 1,234,567.1234567890 (fmt=commas), it should be 12,34,567.1234567890 (2,2,3)
For 1*234*567.123*456*7890, I am not 100% sure what should be the grouping after decimal mark. I never saw or used gaps, commas etc after decimal mark. My guess is 12*34*567.123*456*7890 (2,2,3.3,3,4). আফতাবুজ্জামান (আলাপ) ২০:৫৬, ২৮ ডিসেম্বর ২০২৩ (ইউটিসি)উত্তর দিন
@আফতাবুজ্জামান: I have some code to handle the above. I am wondering whether to put it in your Module:Val so it would work independently of other modules. Alternatively, I could put it in Module:Gapnum so any modules using it here would use 2,2,3 grouping. However, I am unlikely to do that at enwiki so the result would be that your Gapnum would be different from that at enwiki. Which do you want? Johnuniq (আলাপ) ০৪:০৯, ৩০ ডিসেম্বর ২০২৩ (ইউটিসি)উত্তর দিন
Module:Gapnum would be fine. আফতাবুজ্জামান (আলাপ) ১৭:৩৭, ৩০ ডিসেম্বর ২০২৩ (ইউটিসি)উত্তর দিন
@আফতাবুজ্জামান: I added a new function groups_val to Module:Gapnum and called it from Module:Val. The existing groups function in Module:Gapnum has a precision parameter that val does not need and I did not want to muck around trying to implement it. There are two new variables that control what happens:
default_method = 2 -- 2,2,3 grouping
default_gaps3 = false -- gives four digits in last group after "." if necessary; example: "1.2345"
  • {{val|1234567890}}২৩৪৫৬৭৮৯০
  • {{val|1234567.1234567890}}১২৩৪৫৬৭.১২৩৪৫৬৭৮৯০
I think this does everything. Johnuniq (আলাপ) ০০:৩২, ৩১ ডিসেম্বর ২০২৩ (ইউটিসি)উত্তর দিন