Hoan nghênh sửa

  Xin chào Johnuniq!

  Wikipedia tiếng Việt đến nay đã có 1.292.199 bài, đó là kết quả đóng góp quý báu của rất nhiều thành viên trong Wikipedia, mà mọi người đều bắt đầu như bạn. Bạn đã khởi đầu rất tốt và mong rằng bạn sẽ mang đến những đóng góp có giá trị cho quyển bách khoa toàn thư của chúng ta.

 

Xin mời bạn giới thiệu về bản thân tại trang thành viên:Johnuniq.
Khi thảo luận, bạn nhớ ký tên bằng cách dùng 4 dấu ngã ~~~~!.

Mong bạn nhớ các nguyên tắc:
  không viết những gì không bách khoa,
  không truyền lên hình ảnh thiếu nguồn gốc,
  không vi phạm quyền tác giả, và
  phân biệt giữa "tồn tại" và "nổi bật".

Bạn có thể mạnh dạn:
  Tìm kiếm mọi bài mà bạn muốn,
  thử sửa bài thoải mái tại đây,
  đề nghị giúp đỡ của bất cứ ai.

Những chỉ dẫn có ích: các câu thường hỏi, cách viết bài mới, soạn thảo bài, trình bày bài, sách hướng dẫn.
Welcome to the Vietnamese Wikipedia, and thank you for registering! If you do not speak Vietnamese, feel free to use our guestbook for non-Vietnamese speakers.

Cuối cùng, mong bạn thử, đọc, hỏi rồi viết. Cảm ơn bạn và chúc bạn thành công!

 Hoàng Đạt ®, thảo luận ©_ 11:55, ngày 16 tháng 12 năm 2013 (UTC)Trả lời

Re: Convert sửa

Thanks for looking into the tweaks I made (and thanks for writing this awesome module in the first place). I had avoided creating the sandbox modules because they'd encourage even more differences between the Vietnamese and English versions of the modules. I'm a bit busy at the moment, but I do intend to keep the Vietnamese modules up-to-date, and your proposed update will be very helpful.

When localizing templates and modules, I try to localize anything that could appear on an article, just in case. But I can certainly keep the internal error strings in English.

Vietnamese has no inflection; is there anything else at sl: that I should take note of?

 – Nguyễn Xuân Minh (thảo luận, đóng góp) 10:09, ngày 24 tháng 1 năm 2014 (UTC)Trả lời

No I don't think there is anything at sl relevant here—I was just letting you know that I'm doing some complex i18n, and hope to eventually incorporate most of the changes you found were needed here. I'll do what I can without adding too much more complexity to the modules, and when I'm finished I'll update the sandboxes and let you know. Johnuniq (thảo luận) 09:03, ngày 25 tháng 1 năm 2014 (UTC)Trả lời

@Nguyễn Xuân Minh: I am ready to think about your decimalPoint routine. I have a rough idea of how to include it in the module without imposing undue overhead on wikis where it is not needed, and I will slowly start work on that soon. As preparation, I have updated the sandbox versions of convert and convert/text. I kept everything you did, but removed the differences that are not needed—I restored the English internal error strings, and restored hyphenation because there is now a method to cleanly disable it (see the "on" and "mid" settings for "adj" in convert/text).

There have been a lot of changes: enhancements and modifications for other wikis. Certain assumptions were made about the prefixes in SI units; those have been removed for more flexibility. The output can show fractions (please translate the new cvt_bad_frac message). Some common ranges can be entered in a single parameter (example below). Quite a few other changes have also occurred so following a diff is a bit of a nightmare.

Do you have any tests you can use to do a quick check that {{convert}} and {{convert/sandbox}} give the same results, except for the new features? Here are some examples:

  • {{convert|5|-|8|m|2}} → 5–8 mét (16,40–26,25 ft)
  • {{convert/sandbox|5|-|8|m|2}} → 5–8 mét (16,40–26,25 ft)
  • {{convert/sandbox|5-8|m|2}} → 5–8 mét (16,40–26,25 ft)
  • {{convert|1.234.567.890,1234|m|Mm}} → 1.234.567.890,1234 mét (1.234,5678901234 Mm)
  • {{convert/sandbox|1.234.567.890,1234|m|Mm}} → 1.234.567.890,1234 mét (1.234,5678901234 Mm)

I'm hoping you will check the diffs between the main and sandbox modules, do some checks, then copy the sandbox into the main modules. Also, please remove |numdot=,|numsep=. from Template:Convert as those settings are now in convert/text. There should be no visible differences in articles. At any rate, if you find a problem, you could revert and let me know.

What do you think? Is that too disruptive for something that currently works? If you go ahead, please let me know here if you notice anything. If all that works, I will eventually update the sandbox modules again after I work on decimalPoint. Johnuniq (thảo luận) 10:15, ngày 16 tháng 4 năm 2014 (UTC)Trả lời

Thanks for all your hard work reconciling my changes. I'll have more time this weekend to publish the sandbox modules live. I added the translation you requested in Mô đun:Convert/text/sandbox. – Nguyễn Xuân Minh (thảo luận, đóng góp) 10:51, ngày 17 tháng 4 năm 2014 (UTC)Trả lời

There was a bit of work, however, I'm glad you went to the trouble of finding what needed to be changed as that helped me understand what was needed. By the way, comparing convert/sandbox here with my latest version shows only these differences:
Code related to decimalPoint (three places).
Minor change for the Omit any "US"/"U.S."/"imp"/"imperial" stuff.
I hope to integrate the decimalPoint code, but will ignore the other change and may think about it much later. Johnuniq (thảo luận) 01:09, ngày 18 tháng 4 năm 2014 (UTC)Trả lời

I have nearly finished integrating decimalPoint (which I'm calling decimal_mark because that's more like the code style). While working on that I did some related tweaks which I have just uploaded to the sandbox (Module:Convert/sandbox and Module:Convert/text/sandbox). One thing I did was to change "english" to "enwiki" in cvt_english_num. The reason for that is that I have found a couple of wikis where people are very sensitive about "english" and they avoid mention of it (they might use cvt_arabic_num). Anyway, I thought "enwiki" might be comprehensible without controversy. The numsep_remove2 (not finished) is for fawiki where they want to remove the Unicode character they use for thousand separators, and remove commas for numbers copied from enwiki. Take your time, but when you are ready to try the sandbox modules, we'll see how it goes for a couple of days. Then I will be ready to upload a new version to the sandbox with what should be the final version. Johnuniq (thảo luận) 10:09, ngày 19 tháng 4 năm 2014 (UTC)Trả lời

I'm collecting test cases at Bản mẫu:Convert/testcases Mô đun:Convert/sandbox/testcases. No regressions so far, but apparently I overlooked a case or two when I customized the modules. – Nguyễn Xuân Minh (thảo luận, đóng góp) 11:27, ngày 21 tháng 4 năm 2014 (UTC)Trả lời

Module:Convert June 2014 sửa

@Nguyễn Xuân Minh:

It looks like you won't have much time for the foreseeable future, but I have uploaded all the module changes so I can stop thinking about them. The changes are in the sandbox modules, and makeunits.

To use the new code, you would update the main modules from the sandbox and edit Template:Convert:

  • Delete "|numdot=,|numsep=." because that will be in Module:Convert/text.
  • Add "|warnings=0" to enable warnings for numbers with incorrect decimal point, or "|warnings=1" to also enable warnings for invalid options. A higher value for warnings enables more warnings.

The invoke would end up like this:

{{{{{♥|safesubst:}}}#gọi:Convert|convert|warnings=1}}

I have also changed Module:Convert/sandbox/testcases by adding some extra converts that I was using for testing, and by updating the expected outputs to match what the new module does. Please check the diff of my change to the testcases to see some different results.

In Module:Convert/text/sandbox, translation_table defines settings for viwiki. The mtext section is used by Module:Convert/makeunits and includes a messages table. I transferred message text from your makeunits to that table, and you might want to check by comparing the enwiki mtext which is in makeunits with the viwiki mtext in convert/text. A couple of new messages are still in English. The m_var_xxx messages are for slwiki and you can ignore them (they are for a new varname feature used only at the Slovene Wikipedia).

There are a large number of changes in Module:Convert/sandbox with some features requested at enwiki and a lot of code to cope with requirements at slwiki and zhwiki and others. One new feature you might want to know about is that it is possible to display fractions in the output, for example:

  • {{convert/sandbox|31|mm|in|frac=4}}31 milimét (1+14 in)

I am confident that all the changes you put in the modules has been accounted for, and you should notice no change. For example, hyphenation will not occur if adj=on is used, and all the tests you had for checking whether an input number used a dot for a decimal point should still work. Please let me know if you find a convert which shows an unexected difference between your existing modules and the sandbox.

With all the massive changes you may never have time to use the sandbox modules. From my point of view, that's fine—I understand. However, I wanted to get the modules in a form that worked on all the wikis where it is used, and I wanted to incorporate your decimal point checking. I believe that's all working, so I'm happy. Johnuniq (thảo luận) 10:37, ngày 18 tháng 6 năm 2014 (UTC)Trả lời

Thanks for your patience. I finally have some time to work on the wiki again, so this is my top priority. In the future, if you see anything that needs fixing, please use the {{edit protected}} template. – Nguyễn Xuân Minh (thảo luận, đóng góp) 07:42, ngày 19 tháng 6 năm 2014 (UTC)Trả lời

 YXong – Nguyễn Xuân Minh (thảo luận, đóng góp) 22:41, ngày 29 tháng 6 năm 2014 (UTC)Trả lời

@Nguyễn Xuân Minh Good! I like how you used with_separator({}, text) in the warning. I knew that should be done, but I had run out of energy and didn't want to take the time to check if it worked. Please let me know if anything bad happens. Congratulations on one million articles (Signpost 25 June 2014). Johnuniq (thảo luận) 01:57, ngày 30 tháng 6 năm 2014 (UTC)Trả lời