-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is json tools translatable? #70
Comments
@conky77 , JsonTools is not currently translatable. However, I believe that I could implement translation. I can't add translation for everything; here is what I envision translating:
Notably, I don't want to try to translate the text in message boxes. This might require calling up a translation API to translate an error message before rendering the message box, whereas what I'm proposing would just involve having some static JSON files with objects mapping a strings to the appropriate translation in another language. I'll try to come up with an implementation today, add some documentation explaining how to make a pull request adding translation, and then you can add Italian translation if you like. |
@molsonkiko thanks for answering. It should be ok. After the first translation, it would be clearer if it is possible to translate something more. If your work can be the starting for the creation of standard for plugin translation, it would be great. |
In my most recent commit, I've added this JSON with comments file as a mockup of what users could edit to provide translation into other languages. The comments in the file should provide all the explanation that you need. Let me know if there's anything that I could make clearer. I got hung up dealing with other issues today, so I wasn't able to implement the actual logic for translation yet, but I plan to do that tomorrow or the day after. |
@molsonkiko I created the pull request #71 . Please let me know how to test it |
I merged PR #71 so that I can use the JSON file for local testing. I'm still in the early stages of getting it to work; right now it seems like non-ASCII characters like |
Thanks, in Italian the non-standard ASCII are: à, è, é, ì, ò, ù |
I figured out an issue, which I will clarify in my next draft of the JSON: The text for a menu item CANNOT have more than 63 characters (including whitespace) when encoded in UTF-16 (which should just mean 63 letters for your purposes, since all the Italian letters are in the Basic Multilingual Plane). The relevant line of code is here (it says the max length is 64, but that's including the terminating NUL character since it's for a C string), and since it's in the Notepad++ codebase there's nothing I can do (other than request that it be changed, which likely wouldn't work). If a menu item is too long, it could make Notepad++ refuse to start. As it happens, you can easily check which menu items are too long by opening up the Right now the only menu item that is too long is your translation of EDIT: To be clear; there's no reason for you to make another PR. You can just suggest a different translation here in the comments, and I'll make the change on my computer. |
@molsonkiko |
I forgot to include the field for the
What do you think the Italian translation should be? |
@molsonkiko All translations need to be tested. |
@molsonkiko |
@molsonkiko |
I created a new pull request |
You don't need to tell me when you submit a PR; I already get email notifications about that.
Correct. My documentation on translation reflects this. I knew that Notepad++ 8.6.9 would be released soon, and I had to choose between having this new version of JsonTools appear in the Plugin Manager for that Notepad++ version and trying to fix every little outstanding problem with the plugin, and I chose to release this new version. I'm sorry if you disagree with this decision.
As my documentation notes, I do not plan to translate
No, and it won't be. This falls into the category of "message boxes and error messages" as far as I'm concerned, so it won't be translatable. |
@molsonkiko in case you didn't see this issue, since it was between other issues... |
In case you changed your mind, the translations of settings would be very useful. (and warning messages as well) |
See my response to #73 (now closed). |
I've added translation of the settings form as you requested. I also realized that I was missing the correct translation of the
Currently my Italian translation is as follows:
@conky77 |
thanks for setting form: are there new items to translate? |
These instructions provide a guide on how to download unreleased versions of JsonTools or the translation files. If you find those instructions confusing, I'll try to make them clearer. |
@conky77 I also renamed the plugin command Finally, I tweaked the translation of I'll just make a list of tasks related to this issue (the last one is something I just thought of).
|
I've just added support for translation of syntax error messages and JSON schema validation error messages, so if you'd like to translate all the syntax errors under the |
I used Google Translate to translate all the syntax error messages and JSON schema validation error messages myself. You can see the results here. When I translated the Italian translations back into English, the results looked pretty reasonable, so I'm pretty confident you won't need to make many changes to the existing translations. |
Thanks, I'll compare them with the draft I made. Is it possible to keep the same structure of the phrase and the same verb in the error messages? Since it is not an essay and you receive the messages at different moments, the same structure would help the understanding (and the translation would be easier) for example
could be transformed in something like:
|
This is a good idea; I was doing some of that earlier, but I got a little lazy I guess. Once you're done reviewing the error messages, you're welcome to include any proposed changes in |
@conky77 You can view the changes in wording by looking at the changes to |
@molsonkiko |
@molsonkiko (Google Translate translated something like "I tried to terminate the array with "}" that sounds like "I tried to fix the error but I was not able to do it) It helps if the following had the same structure |
Yes, they are keywords in JSON Schema.
No,
That was a deliberate choice on my part. I wrote
That's actually a great idea; I'm going to change the original English to make that clearer.
I may change those. I'll think about it. |
there is another symbol ( ' )
Some message errors start with a capital letter: do I have to respect this rule (because that is not the beginning of the phrase), or can I convert all messages with capital letters for the first letter of the messages |
Here are my new rules for translating, which I will put at the start of the Pay attention to the indented sublist (items start with
|
I've added the ability to translate message boxes. See this field of the translation files. I eventually want to add translation of error messages too. |
@molsonkiko In my opinion, in a caption message of a message box is not very common to see punctuation like exclamation marks ( ? ), exclamation marks ( ! ) or ellipses (...). |
If the message starts with a keyword (like
Yes, obviously I'm aware of this. In C#, Java, C, and many other languages,
Your objection is overruled. |
It is not a OBJECTION , but a suggestion. |
No, you can omit those if you think it makes sense to do so. You can also omit |
I've added translation of the tree view title and the new progress bar for the I spent quite a while in Google Translate trying to make sure that the translations captured the exact meaning I was looking for, but you're welcome to provide feedback. |
I finally translated all the message boxes using Google Translate. As always, I tried to be very careful to ensure that the translations were both readable and consistent with your earlier translations, but you're more than welcome to change anything you think isn't quite right. |
Hi @molsonkiko in september, I will review everything. If you had any test file to reproduce errors and messages you would welcome. So I can test everything. Especially since I don't know all the standards mentioned in the messages. In case once I come back from holidays, I'll give you the details of messages that are not clear to me. |
Unfortunately it is not feasible to provide test files for the Honestly, at this point it is probably fine to just wait and see if any other Italian-speaking users complain about the translation, and save you some trouble. |
Rather than continuing to lengthen this issue's discussion with discussion that's specific to the Italian translation, I will close this issue. @conky77 |
I would like to translate Json tools to Italian: is it possible?
The text was updated successfully, but these errors were encountered: