User avatar
🇨🇦Samuel Proulx🇨🇦 @fastfinge@interfree.ca
6mo
Do you use on the 64-bit ? If so, a new release is available, and we could use your help! You can find out more info on the release page: github.com/fastfinge/eloquence_64/releases/tag/v4
1
18
5
0

User avatar
James Scholes @jscholes@dragonscave.space
6mo
@fastfinge To localise the settings panel: import addonHandler, call addonHandler.initTranslation(), and then wrap all user-facing labels (e.g. text of checkboxes) in a call to the magic underscore (_) function.

E.g.
_('&Maximum number of history entries (requires NVDA restart to take effect)')
2
0
0
0
User avatar
🇨🇦Samuel Proulx🇨🇦 @fastfinge@interfree.ca
6mo
@jscholes Thanks! Don't I have to do...something to build pots and poes and then put them...somewhere?
0
0
0
0
User avatar
🇨🇦Samuel Proulx🇨🇦 @fastfinge@interfree.ca
6mo
@jscholes We are not using scons. We are not using the NVDA addon template. We are not using anything even vaguely resembling a sane build system. See build.cmd and build.py and cry. In other words, if it needs to happen, I need to do it myself.
1
0
0
0
User avatar
James Scholes @jscholes@dragonscave.space
6mo
@fastfinge No, but I did forget one thing: you should put a # Translators: ... comment on the line above where some user-facing text is used for the first time, explaining what that text is for. E.g.:

# Translators: the label for the button to update community dictionaries from GitHub
1
0
0
0
User avatar
🇨🇦Samuel Proulx🇨🇦 @fastfinge@interfree.ca
6mo
@jscholes So where do the localization files come from and where do they go? Do translators make them somehow?
1
0
0
0
User avatar
James Scholes @jscholes@dragonscave.space
6mo
@fastfinge Ah... well: there is a translation workflow which will pull the translatable strings out of your add-on, put them somewhere for translators to translate, and then push the locale files back into your add-on. What I'm unsure about is whether they'd accept Eloquence as an add-on in that system.

The details are here:

github.com/nvaccess/mrconfig/blob/master/readme.md#steps-for-addon-authors
2
0
0
0
User avatar
🇨🇦Samuel Proulx🇨🇦 @fastfinge@interfree.ca
6mo
@jscholes No, they will not. They also won't allow it in the addon store. So to localize the addon, I need to recreate that or a similar workflow.
1
0
0
0
User avatar
James Scholes @jscholes@dragonscave.space
6mo
@fastfinge Indeed. Probably easiest to have people clone the repo, pull out the translatable strings into a file using an appropriate tool (or do that yourself and commit it), compile their own translated strings file, and contribute the textual and compiled versions in a PR.

Even though you're not using the add-on template, you can probably reuse the translation-related utilities from it.

github.com/nvaccess/addonTemplate
1
0
0
0
User avatar
🇨🇦Samuel Proulx🇨🇦 @fastfinge@interfree.ca
6mo
@jscholes Yes, this is the way. Unfortunately I only speak one language, so I can't generate a translation, and I can't switch my NVDA to another language to test the translation. So this work is going to have to fall on someone else, I think. I'm not confident enough in myself to release code I can't really test. I make enough silly mistakes as it is, because I'm not actually good at this and just do it anyway.
1
0
0
0
User avatar
James Scholes @jscholes@dragonscave.space
6mo
@fastfinge You don't really need to test the translations themselves; string selection happens via well trodden code paths inside NVDA. As long as the files end up in the right places (which are documented), it will work.

But I agree with your wider point about the rest of it. I would start by at least making sure the code is set up in the ways I described if it isn't already, because there'll be no translation at all without those bits. And then hope someone can come along to fill in the rest.
1
0
0
0
User avatar
🇨🇦Samuel Proulx🇨🇦 @fastfinge@interfree.ca
6mo
@jscholes It is not. I'll push the code changes soon. I assume doing that won't break anything if no translations or translation infrastructure exists? Like, what happens if you set your NVDA to Spanish, but no Spanish translation is available? Does the addon just refuse to load?
1
0
0
0
User avatar
James Scholes @jscholes@dragonscave.space
6mo
@fastfinge It will fall back to English.
1
0
1
0
User avatar
🇨🇦Samuel Proulx🇨🇦 @fastfinge@interfree.ca
6mo
@jscholes Thanks! This has been helpful. :-) I feel like a sighted developer trying to make something accessible LOL. I have no idea what I'm doing and no way to test it.
1
0
0
0
User avatar
James Scholes @jscholes@dragonscave.space
6mo
@fastfinge Don't tell anyone, but localisation is one reason I don't like working on software for the community. Not because I don't think it's critical; obviously people should have the thing available in their language.

But the common tools are just so... hacky. They feel like they were built with an order of priorities that went developer, translator, user, when I think user and translator are far more important.

As a result, the developer experience isn't actually that great—relying on magic global state and functions as it does—and translations can end up with anglicised word ordering because the English-speaking developers and tools get in the way.
1
0
1
0
User avatar
🇨🇦Samuel Proulx🇨🇦 @fastfinge@interfree.ca
6mo
@jscholes The trouble is, if you make it harder for developers, people like me will never do it at all. Not because we don't care, just because we're stupid and this is a hobby. In an ideal world, translators could somehow translate the text without requiring the developer to do anything but accept a pull request. Again, not because I don't think it's worth the effort, but just because I don't want to write code I can't test.
0
0
0
0
User avatar
🇨🇦Samuel Proulx🇨🇦 @fastfinge@interfree.ca
6mo
@jscholes We also aren't technically supposed to host the eloquence dll files on github. That's why the build process is...the way it is. So that when the repo that contains them gets pulled down, we can get them elsewhere with a quick change.
0
0
0
0