First step to a localized client#6
First step to a localized client#6anderssonfilip wants to merge 13 commits intomastercoin-MSC:masterfrom
Conversation
Externalized string literals. Prepared for language/locale option Invitation for translations at: https://www.transifex.com/projects/p/masterchest-wallet-1/
added enum LocaleTag {None,Text, Numeric}
Languages included (other than English): French Swedish
Merge remote-tracking branch 'upstream/master' Conflicts: source/Form1.Designer.vb source/Form1.vb source/bin/Debug/Masterchest_Wallet.exe source/buyfrm.vb source/sellfrm.vb
|
@zathras-crypto I think it's worth taking a look at this pull request. |
|
@zathras-crypto please take another look at this. To my understanding this needs only be implemented once without huge maintenance afterwards. If you need to connect with tradespoke, you may also use trade-spoke at yandex dot com. It looks like Masterchest is already translated in almost 4-5 languages: |
|
Can you please rebase this pull on the latest master branch? I'll take another look. Thanks |
|
I merged with build 21, can you please take a look. Don't worry, I'll take care of the last details once we have this on the main repository |
Changes required for upstream merge New: Localization\ (folder for translation resources) Localization\Resources.fr-FR.resx (French translation) Localization\Resources.sv-SE.resx (Swedish translation) My Project\Settings.settings (persistence of selected culture, default en-US) LocaleTag.vb (Tag [None, Text, Numeric]) Modified: My Project\Resources.resx (added en-US strings) Form1.vb (added eventhandlers for combobox, moved string literals to resource variables e.g. My.Resources.xxx) Form1.Designer.vb (added combobox 'cbLocale', tagged controls for localization) buyfrm.vb buyfrm.Designer.vb (tagged controls) sellfrm.vb sellfrm.Designer.vb (tagged controls) Masterchest_Wallet.vbproj (referenced System.Configuration.dll) Deleted: None
|
What's the easiest way to test this? Replacing the files does not yield an executable project. I'm wondering how you handle the decimal delimiter and I'm furthermore curious about the fallback to a Swedish culture setting a few times? What's the purpose of this? It would be neat, if you could use proper and consistent naming conventions, e.g. a prefix to indicate the type of an object (textbox, label) and a descriptive name. This is more or less done in most cases, but using camel case may help to increase readability. All translation related resources should be prefixed, too, to indicate it's purpose. It would also be great, if the English default text is included as comment. Please don't get me wrong, this is not a request, but only a suggestion for the future. I'm impressed by the amount of changes and think this is an awesome addition. :) |
|
Hi dex, I can send you a compiled binary if you want to test this? The fallback culture is English-US. The swedish culture is a trick to refresh the datagrids with the correct I agree that the naming convention could be improved. The English default text is visible on mouse hover in Visual Studio, we are On Sun, Apr 6, 2014 at 3:55 AM, dexX7 [email protected] wrote:
|
|
Haha no, I'm using VS, too, but I'm unable to use the files, because I don't know how to import or replace the resources in the existing project. The path "Project - Add - Add Existing Item" + file replacing is not sufficient, because the resources are not recognized per se. A hint how to do so or a copy of your project would be very appreciated. (I'm also available via email: dexx at bitwatch co) |
|
OK, First you need to click "Show all files" in the VS solution explorer, then You will also need to add the settings file as a embedded resource and Good luck! On Sun, Apr 6, 2014 at 11:37 AM, dexX7 [email protected] wrote:
|
|
Thanks, I was able to compile your fork. There are quite a few problems and I don't suggest to merge at this point. Here is a list of my notes:
In the case of a comma delimiter the value of txtsendamount.Text is "0,025" for example. Val("0,025") == 0.
A visual comparison (Mod: France - Mod: English - Original): |
|
Thank you, Some of the things I was already aware of, especially the missing and overlapping labels. I'll work through the list and ask zathras if there is anything unclear in the original code. Still think I can salvage this;) |
|
Fixed a few of them:
Bullet 5. Suggested fix: Updating culture during sync or processing has no effect. Labels are updated only when synced Bullet 7. Fixed by reattaching Rectangle1 to Form1_MouseDown |
|
@zathras-crypto, please let me if you can take a look at this merge. The inconsistency is unsolved, both for the localization and the controls. There are lots of controls called, Label61, Label75 etc so to come up with a consistent naming for localization requires more changes than I'm ready to make Overlapping labels are there but is easy to solve in the UI. Again, I don't want todo any further changes until you looked at it properly. Some of my criticism (meant as help) on the code after looked at it for a day or two:
I'm sure you were planning to remedy this in the future so let me know if you need any help. |
|
Sorry it's taken so long to review, I'll ping @zathras-crypto to take a look ... we should be more friendly to people submitting pull requests. |
|
I added this to the next milestone (due in 9 days). Please note that version 0.4 of the codebase is coming soon, and has significant changes - @tradespoke it would be great if you could rebase the code off of that. @zathras-crypto has promised to give this issue his full attention once smart property is done. Also this would be eligible for Mastercoin Bug Hunt |
|
@zathras-crypto please let me know what you think. I wont waste anymore time on this if it doesn't get merged. I've explained that ui controls need to me moved for string expansion but would rather see that you do this, or I'll do it in another PR Cheers |
|
Hey there - thanks - I asked DexX to take a look and he advised against Thanks! On Tue, Apr 22, 2014 at 11:01 AM, tradespoke [email protected]:
|
|
I'm very, very sure all the work on the implementation and translation will be used at some point! :) But as mentioned there are a few issues and it looks like the latest iteration does not solve all of them (e.g. the problem with localization and decimals) so this is not yet ready for the public. Your criticism and all points listed above are valid and I think we should do a cleanup immediately after the SP release. Once that's done adopting the dynamic localization is probably easier and hopefully we can get rid of the workarounds then too. |
|
@zathras I have done fixes after dexx pointed out problems in my request. I'd prefer if you merge this time, if I do it it may cause more bugs as was the case last time. I'm very willing to help solving the last bits but it needs to be incremental |
|
have you had time to look at this yet? |
|
@tradespoke Masterchest is being deprecated in favor of Master Core. Masterchest was developed and maintained by @zathras-crypto alone by himself, and this is the reason he didn't get to look at pull requests. MasterCore already has a core dev team of 2-3 people, and we are looking to beef up the team in the future as well. |
|
Hi Ron, Thanks for your message. I tip to you is not to advertise bounties when you don't have the means to pay out It may give a bad reputation and speaking for myself have taken away my interest in supporting Mastercoin. I found out that zathras was the only developer on the project after this pull request and also that you were looking for extra developers. I was interested but waited to see how this bounty were handled. I'm still accepting a bounty for this "completed" work! |
|
Hey tradespoke, Firstly please accept my apologies for not being able to give your pull request proper attention during MasterChest development - as Ron has noted it was just little old me and that bottleneck was far from ideal. We've now ceased development on MasterChest and I am contributing to our reference implementation; Master Core. With regard to paying bounties - I can assure you the foundation does have the means to pay :) With that said, fiscal responsibility and budget diligence dictate that they only pay out on completed bounties. Please trust me when I say there is plenty of code I wrote that didn't end up getting used, and thus didn't qualify for bounties. In this case, I believe the bounty was for completed localization of a client - DexX did a good analysis above and I don't believe we could call this complete (you yourself called this "first steps" :) - if I recall the terms of the bounty it had something along the lines of "Localization must be officially adopted"). Anyway, I just wanted to jump in here and make a quick post because I wouldn't like to see you or others discouraged from contributing, it's simply that if they paid for all the code towards incomplete bounties I think the foundation would be broke already haha. Thanks again for your contribution, and I do hope you will stick around and see what we're doing with our Core platform - again as I note this 'single developer' bottleneck will not be an issue there, and you can do prior engagement before cutting code on exactly how to deliver a bounty (and thus how to ensure you get code merged). All the best |
|
Actually I feel that I need to add a few notes here: even though the code was not usable as-it-is, this was by no means due to non-willingness to finalize. This is especially relevant, because of my earlier statement which was "I'm very, very sure all the work on the implementation and translation will be used at some point!" as well the assurance to allocate time to evaluate the localization patch after v0.4. |
|
Thanks guys for taking the time to reply. Obviously, it was "the first step" since I had no possible way to complete this without help from a developer on the inside, nor could I continue to to keep up with the master without introducing new bugs as dexx pointed out. Anyway, I sincerely appreciate the clear communication and hope my comment above doesn't discourage other people from contributing!! As usual, I answered too quickly yesterday and wish I'd left out the last sentence. I write code because I believe in open-source but since there are so many projects one need to be very selective where and how to contribute. Good luck guys, I hope I have time to dig into the reference implementation someday to really understand the details of your project. |
|
@tradespoke thank you for your understanding, I obviously can't make any actual decisions but just wanted to feed back based on my experiences - if you ever want to talk to us about getting involved in the reference please don't hesitate to shout :) |

hey, awesome piece of software you've written. I've made some changes to cater for a localized version, all strings are externalized and there is crowd sourced effort on the way to get other languages added.
Would really like to see this in the base version at some time so please check out my changes!