Closed CyrilleB79 closed 1 year ago
Hi, I update copyright year as soon as it is updated on NVDA source code itself, and I don’t think this process is documented. Thanks.
@seanbudd what is the status of this? With @josephsl retiring/retired, who is managing this now? I know it is planned to move away from this system, but until that happens (and many things could delay it), if this is still undocumented/unautomated ...
From my understanding, in actual NVDA builds, each translated t2t file includes user_docs/global.t2tConf. Note this is different to the global.t2tConf in the srt repository. I think (but am not sure) that the srt global.t2tConf is only used when compiling translations to html within the translation system for proof reading.
The global.t2tConf in NVDA's user_docs dir, does not directly define any version macros, rather it includes build.t2tConf, which is populated by NVDA's sconstruct with the version macros set to the version values for the current build.
Thus, the srt/global.t2tConf does not at all affect releases of NVDA.
For ease of administration and clearer understanding, perhaps srt/global.t2tConf should hardcode these version strings as something like "translation test <svn revision number>"
.
Is anyone able to verify my assumptions here?
From my understanding, in actual NVDA builds, each translated t2t file includes user_docs/global.t2tConf. Note this is different to the global.t2tConf in the srt repository. I think (but am not sure) that the srt global.t2tConf is only used when compiling translations to html within the translation system for proof reading.
This is correct. In the log, we can see that the version has not always been updated for each actual NVDA version.
Thus, the srt/global.t2tConf does not at all affect releases of NVDA. For ease of administration and clearer understanding, perhaps srt/global.t2tConf should hardcode these version strings as something like
"translation test <svn revision number>"
.
Yes, this makes sense to me. Since there is no direct link between NVDA's repo content and the version and copyright year, there is no point to keep it up-to-date. Something different such as "Proofing version" makes things clearer.
I guess this can be closed then?
We should only close this issue when a decision is made (and implemented) on how to keep SVN's global.t2tconf
up-to-date. There are 3 possibilities:
%!PostProc: NVDA_VERSION Translator's test version
The solution with the SVN commit number seems the nicest to me. But I have no idea on how to implement it, and such a small problem is not worth spending time researching and implementing a solution. If someone already has an idea on how to get the SVN commit and include it in the file, go ahead!
I think the only way to get the SVN revision number included, would be to use a script called by a post-commit-hook, which would encode the last revision number. I.e. because committing the revised global.t2tconf would be itself a revision, the hook could only know the revision which triggered it, not the very last which would be its own update of the version macro.
And the hook would have to make sure that it did not trigger itself by its own revision--e.g. by checking something returned by $(svn info)
.
Seems tricky, and could become recursive if not careful.
How often are the HTML files built? It would seem easier to have a cron job on NV Access servers, that just updates a date in a file every day, or every 12 hours, or whatever.
E.g. replace the "NVDA_VERSION
" macro in global.t2tconf
with:
%!Includeconf: version.t2tconf
Then have a cron job on the NV Access server run a script like this as a daily task:
#!/bin/bash
cd "SRT_root_directory_here"
svn lock -q version.t2tconf
date '+%%!PostProc: NVDA_VERSION TranslationTestOn%Y-%m-%d' > version.t2tconf
svn commit -q -m "Automated version.t2tconf update"
Or, expand the date reference in the above to include a time, and run it as part of the translatoBot, if it needs to be updated more than daily.
Lets go with option 1 (no revision information) as the alternative is too complicated and not worth the time or risk.
I've now updated the values in srt/global.t2tconf
New snippet:
% We need to do this one as PostProc so it gets converted for the title.
% These values are only used in the translation system, not the release system.
%!PostProc: NVDA_VERSION "translation preview version"
%!PreProc: NVDA_URL https://www.nvaccess.org/
%!PreProc: NVDA_COPYRIGHT_YEARS 2006-2023
In the screenreader translations SVN repo, the
global.t2tconf
file is updated for each release with the new release version and updated copyright years if needed. The part of the file which is updated are the following lines:Today it seems that this updates are done manually by @josephsl (a.k.a. nvdakor in SVN) for each release. Moreover, I do not know if it is documented somewhere; @josephsl is it?
It would be interesting to have it automated. In this repo, it could by handled in the nvda2svn processing:
There are many ways to solve this issue: