How to find the context of a string?
-
I want to update a translation file by adding new strings from the latest english.xml file.
Sometimes, context is required to write the best localized string, but in some cases, I simply could’t find it in the latest version of the editor.
How can I find where a string is being used?
BTW, is it safe to remove strings that no longer appear in the official english.xml file?
-
@vitococl said in How to find the context of a string?:
I simply could’t find it in the latest version of the editor.
Probably an example here would help.
is it safe to remove strings that no longer appear in the official english.xml file?
Yes.
-
@Alan-Kilborn said in How to find the context of a string?:
Probably an example here would help.
<Item id="50010" name="Function Parameters Previous Hint"/> <Item id="50011" name="Function Parameters Next Hint"/>
There are some texts that should be on a given menu but do not appear, so I guess that it was included in the english.xml file before releasing it to the wild or removed from the app but not from the file. An example:
<Item id="6132" name="Hide right shortcuts + ▼ ✕ from the menu bar (Need to restart Notepad++)"/>
Also, there are some unlocalized texts in the app. Should I expect them to appear in english.xml file soon?
Thanks!
-
The examples you used (all 3) are “bleeding edge”, meaning that english.xml has been changed in the github code repo but a release of Notepad++ has not occurred that make use of the newest items.
Your best bet may be to see the other code changes that went along with these new additions, to see if that will give you proper context for doing a good translation. Usually there is an “issue” and a “PR” for all changes, so you should be able to track it that way.
You can also download an unreleased .exe with the changes in it, to actually see the code working (ahead of a real release), and thereby understand the change context enough to do your translation.
Does this make sense? Do you know how to do all that (assuming if you are savvy enough to “watch” changes in english.xml in the github repo, you know how to do this other stuff)?
there are some unlocalized texts in the app. Should I expect them to appear in english.xml file soon?
Probably not unless someone points out these bits of text in the form of an “issue”. Otherwise developers won’t know that something more needs to be translated.
-
So as an example, for the 50010 and 50011 you mentioned…
There’s a commit for this change.
From that commit, you can see other code changes that went along with changing english.xml, and you can also see the PR - pull request and the issue that the final commit originated from:The issue and PR should contain enough discussion materials for you to understand the change and gather enough context to do a translation.
In the event that it doesn’t you can follow the procedure HERE to get the code and attempt to try out the new feature.
-
@Alan-Kilborn said in How to find the context of a string?:
The examples you used (all 3) are “bleeding edge”, meaning that english.xml has been changed in the github code repo but a release of Notepad++ has not occurred that make use of the newest items.
The latest english.xml file in the repository says 8.4.1 and the installed app is 8.4.4, so I expected that all the items in the file to be present in the app. I think that it was my fault to download it from the repo because my installation did not have the localization folder (I guess it was because I did a default install).
But I think it’s better to have this strings translated before the next release… or not?
@Alan-Kilborn said in How to find the context of a string?:
Does this make sense? Do you know how to do all that (assuming if you are savvy enough to “watch” changes in english.xml in the github repo, you know how to do this other stuff)?
Yes, it makes sense, but I didn’t want to track changes in english.xml from the lastest version of the file I’m working on, so I just wrote a script that merges both latest versions and highlights untranslated lines (the new ones) in the resulting file.
Then, I’ll have to decide about how to submit my updated file.
@Alan-Kilborn said in How to find the context of a string?:
Probably not unless someone points out these bits of text in the form of an “issue”. Otherwise developers won’t know that something more needs to be translated.
Should the status line be translated or is it WAD? I see “length : NNN lines : NN”. Besides that I read “Ln”, “Col” and “Pos”, and those fit to both English and Spanish (the language I’m interested in), and I don’t think that those are localized because there is no mention of them in the XML files.
-
@vitococl said in How to find the context of a string?:
The latest english.xml file in the repository says 8.4.1
I don’t think what it says in that file means much. It seems to always trail behind.
But I think it’s better to have this strings translated before the next release
Ideally yes, but in practice it doesn’t always happen. I think there is some sort of notification to known translators that a release is imminent, because I do notice flurries of translations being done right before a release happens, and they are not being done by the Notepad++ author – the only one who knows when a release is about to happen.
Should the status line be translated
I don’t know if it should be, but it clearly isn’t (see HERE where they are all “hard coded”).
-
@Alan-Kilborn said in How to find the context of a string?:
I think there is some sort of notification to known translators that a release is imminent, because I do notice flurries of translations being done right before a release happens, and they are not being done by the Notepad++ author – the only one who knows when a release is about to happen.
I’m new in this community. If there is some sort of communication between the author and the localizer volunteers, I’m probably making noise here. I’m not a new guy in localization, and I don’t want to annoy others if there are experienced teams around this development.
I got into this is because I’m a returning user for the app and I found that there were too many untranslated strings as I could verify in the latest XML file from the repo.
But I also found that there are some missing stings in the source english.xml files, and that already translated strings are not being used by the app. I guess that I should submit an issue, but that will take some time, app usage time to find enough cases and to explore the source code…
Thank you for your help and pointers to the source code for the examples. That made me understand better what is going on.
-
@vitococl said in How to find the context of a string?:
If there is some sort of communication between the author and the localizer volunteers.
This was just a guess on my part, coming from watching what gets submitted when. I don’t know any details.
I also don’t know if there is a localization volunteer for the language you are interested in.