ব্যবহারকারী:Johnuniq/Translation
Convert template and modules
- Template:Convert ∙ invokes Module:Convert
- Module:Convert ∙ script to convert units
- Module:Convert/data ∙ units
- Module:Convert/extra ∙ extra data for trying new units
- Module:Convert/text ∙ messages
The above modules have been updated to match the current versions at enwiki (Module version 3, 2014-04-08). Johnuniq (আলাপ) ০৬:১৬, ৮ এপ্রিল ২০১৪ (ইউটিসি)
Archives of this page
Some no-longer-needed material has been archived:
Messages
[সম্পাদনা]I have updated Module:Convert/text to the latest version. One large change concerns how error messages are displayed. In the new system, the message is rather subtle and you need to hover the mouse over the error message to see more information. Examples of messages, with documentation, can be seen at en:Help:Convert messages. Each message links to a section on that page. In due course, you can copy the help page, then translate it, then edit convert/text to change the name to match the local title.
I copied the messages that were translated last year. Please check the following which shows the current en message and the bn message from last year. It's likely that some of the en messages have been slightly rearranged, and the bn text may need similar rearrangement. There is one new message, cvt_bad_frac which applies to the new |frac=N option (N is a number like 8 to have the output display a fraction rounded to the nearest eighth). Please edit the new convert/text module to fix any problems, or edit the table below and tell me when it is complete. In these messages, %s is replaced with a string (text) showing the invalid input. Johnuniq (আলাপ) ০৪:৩০, ৮ এপ্রিল ২০১৪ (ইউটিসি)
| Message code | Message at en | Message at bn |
|---|---|---|
| cvt_bad_num | Value "%s" must be a number | মান "%s" অবশ্যই সংখ্যা হতে হবে |
| cvt_big_prec | Precision "%s" is too large | "%s"-এর নির্ভুলতা অত্যন্ত বড় |
| cvt_invalid_num | Number has overflowed | সংখ্যা অত্যন্ত বড় বা অত্যন্ত ছোট |
| cvt_no_num | Needs the number to be converted | মান প্রয়োজন |
| cvt_no_num2 | Needs another number for a range | আরেকটি মান প্রয়োজন |
| cvt_bad_frac | frac "%s" must be an integer above 1 | |
| cvt_bad_prec | Precision "%s" must be an integer | প্যারামিটার "%s" স্পষ্টত অবশ্যই পূর্ণসংখ্যা সংখ্যা হতে হবে |
| cvt_bad_sigfig | sigfig "%s" must be a positive integer | প্যারামিটার sigfig "%s" অবশ্যই ধনাত্মক পূর্ণসংখ্যা সংখ্যা হতে হবে |
| cvt_empty_option | Ignored empty option "%s" | খালিভূক্তি "%s" উপেক্ষিত হয়েছে |
| cvt_no_spell | Spelling is not available | বানান দুষ্প্রাপ্য |
| cvt_unknown_option | Ignored invalid option "%s" | অবৈধ সুবিধা "%s" উপেক্ষিত হয়েছে |
| cvt_bad_default | Unit "%s" has an invalid default | একক "%s" পূর্বনির্ধারিত অবৈধ ত্রুটি |
| cvt_bad_unit | Unit "%s" is invalid here | এখানে একক "%s" অবৈধ |
| cvt_no_default | Unit "%s" has no default output unit | একক "%s"-এর পূর্ব-নির্ধারিত আউটপুট একক নেই |
| cvt_no_unit | Needs name of unit | এককের নাম প্রয়োজন |
| cvt_unknown | Unit name "%s" is not known | একক "%s" অজানা |
| cvt_mismatch | Cannot convert "%s" to "%s" | "%s" থেকে "%s" রূপান্তর অসম্ভব |
| cvt_bug_convert | Bug: Cannot convert between specified units | বাগ:নির্দিষ্ট এককে রূপান্তর সম্ভব নয় |
| cvt_lookup | Unit "%s" is incorrectly defined | একক "%s" ত্রুটিপূর্ণভাবে সংজ্ঞায়িত হয়েছে |
At all_messages, more translations are needed:
cvt_formatdetermines the appearance of an error message; the message contains three "Convert"; I suggest not changing the first one, but you may want to translate the second two.- The text under "Link text" needs translation, for example 'invalid number'.
Following are some error messages to demonstrate:
{{convert|xyz|m}}→ [রূপান্তর: অকার্যকর সংখ্যা]{{convert|1|bogus}}→ ১ bogus[রূপান্তর: অজানা একক]{{convert|1|mpg}}→ ১ mpg[রূপান্তর: অনির্ধারিত একক]
The pop-up text that appears when the mouse is held over the last message is in Module:Convert/data. Johnuniq (আলাপ) ০৬:৫৩, ৮ এপ্রিল ২০১৪ (ইউটিসি)
- Module:Convert/text Translations done --Aftab1995 (আলাপ) ১৬:১৫, ৮ এপ্রিল ২০১৪ (ইউটিসি)
Categories
[সম্পাদনা]Another change concern the categories. The old system used four categories:
- general বিষয়শ্রেণী:রূপান্তরজনিত ত্রুটি
- mismatch বিষয়শ্রেণী:অসামঞ্জস্য মাত্রায় রূপান্তর
- option বিষয়শ্রেণী:অবৈধ সুবিধায় রূপান্তর
- unknown বিষয়শ্রেণী:অজানা এককে রূপান্তর
Enwiki uses two categories:
However, I recommend just one category. Not many errors occur, and it is not useful to have them split into two categories. What name would you want for one error category? If you want, have two categories, in which case two names are needed. By the way, the new modules have a different default: error categories are only added to articles (not templates or other pages). Johnuniq (আলাপ) ০৬:০১, ৮ এপ্রিল ২০১৪ (ইউটিসি)
পছন্দ One category is better. Please add general error category বিষয়শ্রেণী:রূপান্তরজনিত ত্রুটি. --Aftab1995 (আলাপ) ১৬:১৫, ৮ এপ্রিল ২০১৪ (ইউটিসি)
- OK, I entered the one category, and (in this section) unlinked the categories that are not used to remove the red links. Someone should create the category page as a tracking category (usually that means making it a hidden category). Perhaps you or Bellayet would like to do that. It looks like everything is finished for now, thanks. I'll probably return in a few days to update makeunits and the master list of units. When I do that I'll add a note to this page about how you can fix unit definitions. Johnuniq (আলাপ) ০২:৩৪, ৯ এপ্রিল ২০১৪ (ইউটিসি)
Hyphenation
[সম্পাদনা]At enwiki, the "adj" option (adjectival) can be used to make a unit use the singular name, and to use a hyphen. An optional "mid" word can be inserted. Following are three examples showing text copied from enwiki, and the same three examples live here:
{{convert|125|ft}}→ 125 feet (38 m){{convert|125|ft|adj=on}}→ 125-foot (38 m){{convert|125|ft||adj=mid|-long}}→ 125-foot-long (38 m){{convert|125|ft}}→ ১২৫ ফুট (৩৮ মিটার){{convert|125|ft|adj=on}}→ ১২৫-ফুট (৩৮-মিটার){{convert|125|ft||adj=mid|-long}}→ ১২৫-ফুট-long (৩৮-মিটার)
It is now possible to disable hyphenation. Do you want that? Johnuniq (আলাপ) ০৪:৪৭, ৮ এপ্রিল ২০১৪ (ইউটিসি)
Units
[সম্পাদনা]@আফতাবুজ্জামান: There is a question from Babaisarkar2 at en:Template talk:Convert#Some units not getting localized/translated about updating a unit. I can't find any documentation on how I created and then updated units for bnwiki. Normally I would have created Module:Convert/makeunits which reads unit definitions from a master list and produces the wikitext which would be copied into Module:Convert/data. Perhaps I did not get around to doing that because bnwiki was the first site to run the module. An old master list from 2013 is at User:Johnuniq/Conversion data. In your edits at Module:Convert/data, did you copy the wikitext from somewhere? Johnuniq (আলাপ) ০৪:২৫, ২ জানুয়ারি ২০২৫ (ইউটিসি)
- Johnuniq, I don't remember exactly how you did it, but most likely at that time you run the script offwiki.
- Yes, I copied some part from enwiki and translated manually. All the other edits (mine and others) are also done manually.
- We didn’t update Module:Convert/data since 8 april 2014. I can try. If I understand correctly, I need to translate User:Johnuniq/Conversion data (copying updated version from enwiki), and then {{#invoke:convert/makeunits|makeunits|User:Johnuniq/Conversion data}} will do the rest. Correct? আফতাবুজ্জামান (আলাপ) ১৫:৪৭, ২ জানুয়ারি ২০২৫ (ইউটিসি)
@আফতাবুজ্জামান: Please see the list of sandboxes I put at User:Johnuniq#Convert. They are currently red links although I might create the pages soon. Do you remember if those pages ever existed somewhere? It doesn't matter, I'm just curious. I probably did not use a sandbox back then. Please confirm that these are the correct links. Johnuniq (আলাপ) ০৩:৪২, ৪ জানুয়ারি ২০২৫ (ইউটিসি)
- @আফতাবুজ্জামান: I tried to copy Module:Convert/data to Module:Convert/data/খেলাঘ but an edit filter prevented the edit saying it contained a phone number. Is there some easy way to prevent that happening that again because it is super irritating! Johnuniq (আলাপ) ০৪:৫৬, ৪ জানুয়ারি ২০২৫ (ইউটিসি)
- @Johnuniq, I have corrected this, and created the page. I don't know why it triggered the edit filter, please let me know if it happen again, then i will disable the filter temporary.
- Now all the sandboxes link are correct. I didn't find those pages anywhere, yes, most probably you did not use a sandbox back then. আফতাবুজ্জামান (আলাপ) ২৩:৩০, ৪ জানুয়ারি ২০২৫ (ইউটিসি)
- @আফতাবুজ্জামান: The edit filter interrupted me again. Johnuniq (আলাপ) ০৩:৪৯, ৫ জানুয়ারি ২০২৫ (ইউটিসি)
- @Johnuniq, I have given you autopatrolled right, it will bypass the filter. আফতাবুজ্জামান (আলাপ) ০৪:০৬, ৬ জানুয়ারি ২০২৫ (ইউটিসি)
- @আফতাবুজ্জামান: The edit filter interrupted me again. Johnuniq (আলাপ) ০৩:৪৯, ৫ জানুয়ারি ২০২৫ (ইউটিসি)
@আফতাবুজ্জামান: I am nearly finished updating the units. It's too hard to get everything the same as at enwiki but the vast majority have been done. Before thinking about updating the main convert modules, the error/warning categories should be emptied so any new problems can be found to check what the updated modules do. I made a couple of fixes (diff1, diff2). Please see if you can work through these:
If wanted, the new modules could use just the first category for all problems. Johnuniq (আলাপ) ০০:১৮, ১২ জানুয়ারি ২০২৫ (ইউটিসি)
- Johnuniq, I will try to clear the category in 2/3 days. আফতাবুজ্জামান (আলাপ) ২২:১৫, ১৩ জানুয়ারি ২০২৫ (ইউটিসি)
- Good, no rush. Johnuniq (আলাপ) ০১:৪০, ১৪ জানুয়ারি ২০২৫ (ইউটিসি)
- @Johnuniq, We have almost cleard the category. There are few pages left but that is due to some unit name or symbol not recognized by the module. They should be fixed if we update the modules. I think we should start updating. Please let me know if anything needs translating. And one question: by defult
abbroption ison, is it possible to do the oppsite for bnwiki as we rarely use the short/abbreviation form? It would be better if the module gives the full form by default (abbr=off). আফতাবুজ্জামান (আলাপ) ২৩:২১, ১৮ জানুয়ারি ২০২৫ (ইউটিসি)- @আফতাবুজ্জামান: I can see that the remaining problems are hard to track down. I made a change in diff that needs your attention. I put
|abbr=off defaultin the sandbox template (diff). You can do the same in the main template. That means any convert without anabbroption will not abbreviate. However, Template:Cvt will still abbreviate due to it having|abbr=on always. That is documented at en:Template:Convert/Transwiki guide/translate#Unit names. I will return in a few hours and remind myself where the sandbox modules are up to and will ping you again when it is ready to be copied into the main modules. Johnuniq (আলাপ) ০১:৩৩, ১৯ জানুয়ারি ২০২৫ (ইউটিসি)
- @আফতাবুজ্জামান: I can see that the remaining problems are hard to track down. I made a change in diff that needs your attention. I put
- @Johnuniq, We have almost cleard the category. There are few pages left but that is due to some unit name or symbol not recognized by the module. They should be fixed if we update the modules. I think we should start updating. Please let me know if anything needs translating. And one question: by defult
- Good, no rush. Johnuniq (আলাপ) ০১:৪০, ১৪ জানুয়ারি ২০২৫ (ইউটিসি)
@আফতাবুজ্জামান: I updated User:Johnuniq with a better list of links and created Module talk:Convert/tester to show diff links that compare the main and sandbox modules. The sandbox modules are ready to be copied to the main modules but there is one job that should be done first (although it could be done later). The enwiki names for each type of unit at User:Johnuniq/Conversion data#Automatic per units should be translated. Each item has to exactly match a subsection heading in User:Johnuniq/Conversion data#Conversions. See en:Module:Convert/documentation/conversion data#Automatic per units for a guide. At enwiki, the first entry is for /area which uses the heading "Area" for section 5.3 (converted to lowercase), and per unit area uses the heading for section 5.31. See the instructions at the top of User:Johnuniq/Conversion data for how to update the units after editing that page. Johnuniq (আলাপ) ০৩:৩৭, ১৯ জানুয়ারি ২০২৫ (ইউটিসি)
- @Johnuniq, Do i need to translate "Linked article" column at User:Johnuniq/Conversion data#Links and "Type/type" column at User:Johnuniq/Conversion data#Automatic per units? আফতাবুজ্জামান (আলাপ) ২৩:৪৫, ১৯ জানুয়ারি ২০২৫ (ইউটিসি)
I'll reply to the above question when I get time to investigate (I don't understand some results at the moment because I haven't looked at it for a long time). Meanwhile, here is a reminder to us regarding the original question (see top of this section). Article স্থানীয় গোষ্ঠী needs convert to be corrected so the following gives translated names (it currently shows megaparsec and light-year which should be মেগাপারসেক and আলোকবর্ষ respectively).
{{convert|3|Mpc|e6ly km|lk=on|abbr=off|sigfig=1}}→ ৩ মেগাপারসেক (১০ নিযুত আলোকবর্ষ; ৯×১০১৯ কিলোমিটার){{convert/খেলাঘর|3|Mpc|e6ly km|lk=on|abbr=off|sigfig=1}}→ ৩ মেগাপারসেক (১০ নিযুত আলোকবর্ষ; ৯×১০১৯ কিলোমিটার)
Are the two "should be" links above correct? The first one is red at the moment. Johnuniq (আলাপ) ০১:১৬, ২০ জানুয়ারি ২০২৫ (ইউটিসি)
- @Johnuniq, Yes, correct. Just transted that part. Will do rest. আফতাবুজ্জামান (আলাপ) ০২:১৯, ২০ জানুয়ারি ২০২৫ (ইউটিসি)
- Regarding the "Linked article" column: An entry is only required if there is a useful article that is different from the base unit. For example, the Energy section defines the unit
J(joule) with link জুল. Enwiki has a redirect at en:Megajoule and if MJ is linked, it is desirable for the mouse-over pop-up message to say "Megajoule" to provide a clue what MJ means. Therefore, at enwiki, the "Linked article" column defines a link for MJ. You could do the same if wanted, using bnwiki translations (but you should create the redirect if there is no article on megajoule). Otherwise, delete the MJ entry. The result would be that if anyone uses a convert withlk=onfor MJ, it would use the link defined for J. - Regarding the "Type/type" column: I don't think that is translated. I can't work out exactly how it is used at the moment and I'll have to work that out later. Leave it for now.
Johnuniq (আলাপ) ০৬:১৪, ২০ জানুয়ারি ২০২৫ (ইউটিসি)
@আফতাবুজ্জামান: The answer is yes, the names in the "Type/type" column need to be translated. Following is an example of a sandbox convert that currently gives a unit mismatch error message. It will display a valid result when the translation for speed is done.
{{convert/খেলাঘর|12|m/d|in/h}}→ ১২ মিটার প্রতি day (২০ inches per hour)