open-contracting / extension-explorer

Disclose more data about your contracting processes, using extensions to the Open Contracting Data Standard
https://extensions.open-contracting.org/
BSD 3-Clause "New" or "Revised" License
3 stars 0 forks source link

extension_explorer/templates/publishers.html: Integrate content from … #84

Closed duncandewhurst closed 1 hour ago

duncandewhurst commented 4 months ago

Closes https://github.com/open-contracting/standard_extension_template/issues/41

jpmckinney commented 4 months ago

Just checking what makes this PR a draft?

coveralls commented 3 months ago

Pull Request Test Coverage Report for Build 11730318943

Details


Totals Coverage Status
Change from base Build 11595304343: 0.0%
Covered Lines: 426
Relevant Lines: 445

💛 - Coveralls
duncandewhurst commented 3 months ago

Oops, I somehow missed the notification about your comment. Sorry!

It was draft because I needed to resolve the pytest failure. I've done that now.

As well as integrating the content from how the extensions work I think that we should also integrate the content from codelists. Otherwise, the explanations of schema extensions and codelist extensions will be in different places. I've rewritten the codelist explanation to follow the same style as the schema guidance:

An extension's codelist CSV files follow the structure of the OCDS codelist files and describe new codelists and codes. To add a new codelist, ensure that your filename does not clash with any existing codelist filenames. To add codes to an existing codelist, name your file +<codelist filename>.csv and ensure that the new codes do not clash with any existing codes. For example, to add 'subcontractor' to partyRole.csv, add a file named +partyRole.csv to the codelists directory and set its content to:

Code,Title,Description
subcontractor,Subcontractor,An organization that will perform part of a contract on behalf of a supplier.

Shall I add that to this PR?

duncandewhurst commented 3 months ago

Oh, I forgot that https://github.com/open-contracting/standard_extension_template/issues/41 is about moving all the content. I may as well do it all in this PR, but I'll prepare a draft in Google Docs before updating the HTML templates.

duncandewhurst commented 3 months ago

Work in progress content

duncandewhurst commented 3 months ago

Continued in https://github.com/open-contracting/standard_extension_template/issues/41#issuecomment-2239192221

duncandewhurst commented 2 days ago

Logging the steps I followed so far, for posterity:

  1. Convert to HTML using Google Docs to HTML
  2. Add translation tags, e.g. for <h4> tags: find <h4>(.*?)</h4> and replace with <h4>{{ _("$1") }}</h4>
  3. Use single quotes for link targets: Find href="(.*?)" and replace with href='$1'
  4. Add <code> tags (manual)
  5. Wrap code blocks in <pre> and <code> tags and remove any HTML and translation tags within the block
  6. Remove and characters
  7. Replace pretty apostrophes () with single quotation marks (')
  8. Remove empty paragraphs, e.g. <p></p>
  9. Remove whitespace-only hyperlinks: Find <a href=(.*?)> </a> and replace with (might get some false positives)
  10. Replace '%' in link targets with '%%'
  11. Format using Prettier
  12. Use single quotes for link targets (again)

To-do:

duncandewhurst commented 1 day ago

@jpmckinney the lint check is failing because ruff reports errors on Python files not touched by this PR.

jpmckinney commented 1 day ago

Needed to merge main.

duncandewhurst commented 1 day ago

Ah, I forgot this was an old branch. Thanks!

duncandewhurst commented 1 day ago

Leaving as draft pending further input on the needs of extension authors in https://github.com/open-contracting/standard_extension_template/issues/41. Otherwise, this is ready for review.

jpmckinney commented 3 hours ago

I think we might as well get this PR done and make other changes/improvements later.

@yolile I pushed strings to Transifex: https://app.transifex.com/open-contracting-partnership-1/ocds-extension-explorer/translate/#es/messages/306008985

yolile commented 1 hour ago

Translated