-
Notifications
You must be signed in to change notification settings - Fork 0
Build a translated version of sustainability.yaml #509
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
base: 0.9-dev
Are you sure you want to change the base?
Conversation
for more information, see https://pre-commit.ci
|
Good catch on the multiple translations!
I can't remember what the issue was, so I'll be happy for you to propose the solution :) |
|
Thanks for fixing up the ocds-babel PR :-) The issue in #383 was that using I had thought the issue would be to do with the implementation of Indeed, when testing on a "clean" Sphinx docs site, Markdown links are rendered correctly by both So I think the problem is somehow related to another extension or dependency in this project, but I'm stumped on how to track it down. Inspecting the HTML output, the content of the span containing the link text is missing when using
<a class="reference internal" href="../../common/#add-a-project-document"><span class="std std-doc">Add a project document</span></a>
<a class="reference internal" href="../../common/#add-a-project-document"><span class="std std-doc"></span></a> |
|
Hmm, yes, I can replicate by changing to csv-table-no-translate in docs/cost/ids/core.md for e.g. Project level Reactive disclosures tables. As expected, the XML ( <paragraph translatable="False"><reference internal="True" refuri="../common#add-a-project-document"><inline classes="std std-ref"></inline></reference> y establecer <literal translatable="False">.documentType</literal> de 'budgetAmendmentApproval'.</paragraph>Edit: Ah, and the reason we don't want to use
We had switched to it in #383 because the full table was translated, and so it seemed appropriate. (csv-table-no-translate is often used to avoid translating columns that ought to be the same in both languages, like field names.)
|
|
@duncandewhurst In #383 (comment) I asked why conf.py writes files to |
|
@duncandewhurst Do you have a "clean" Sphinx repo that you can push to a new repo, for testing? Edit: I think that will be easier to diagnose. There's an open issue about upgrading Sphinx, myst-parser, docutils, etc. but I don't think that'll solve the issue. open-contracting/software-development-handbook#104 Edit2: I am trying now, just to see, with |
|
👍 to removing those lines from Here's a 'clean' Sphinx repo with the bare minimum requirements for testing: https://github.com/duncandewhurst/clean-sphinx. The text content is present in both directives: |
|
Okay, after adding more specific content to clean-sphinx, I can replicate. So far, it's Edit: Seems to be a bug in csv-table-no-translate: OpenDataServices/sphinxcontrib-opendataservices#50 (demonstrated in duncandewhurst/clean-sphinx#1) |
|
Once the bug is fixed, we can do the task in #509 (comment). There's also an unresolved PR comment. |

Whilst working on this, I noticed that the
Descriptioncolumn in the 'core' CoST IDS mapping CSVs was untranslated because the column header was renamed from 'CoST IDS draft definition', butbabel_ocds_mapping.cfgandconf.pyweren't updated accordingly. However, that column is translated in the CoST IDS to OC4IDS mapping and in the OCDS to OC4IDS mapping HTML pages because the tables on those pages use thecsv-tabledirective rather than thecsv-table-no-translatedirective.As a result, we've essentially been maintaining three translations for the 'CoST IDS element' and 'Description' columns (one in the
infrastructure-mappingsresource, extracted using OCDS Babel, and one each in thecost--ids-coreandcost--ocdsresources, extracted using the MyST Parser). Likewise, we've been maintaining two translations for the 'Mapping to OC4IDS' and 'Mapping from OCDS' columns, one ininfrastructure-mappingsand one incost--ids-coreorcost-ocds.It looks like we decided to use
csv-translateinstead ofcsv-no-translatein #383, perhaps without realising the consequences.So that we can build fully-translated CSV files for use in the mapping template, I've updated the config files and extracted the descriptions in 6f674b7 and pre-translated the descriptions using the translations from the HTML pages as a compendium in 2502eec.
I haven't pushed the updated translations to Transifex, yet.
Ultimately, I think we'll want to switch back to using
csv-table-no-translatefor the mapping tables, but the issue that prompted #383 will need to be resolved, first. I think I can probably fix that one myself.cc @jpmckinney