Skip to content
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

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

Merged
merged 13 commits into from
Nov 7, 2024

Conversation

duncandewhurst
Copy link
Contributor

@duncandewhurst duncandewhurst commented Jun 26, 2024

@jpmckinney
Copy link
Member

Just checking what makes this PR a draft?

@coveralls
Copy link

coveralls commented Jul 18, 2024

Pull Request Test Coverage Report for Build 11730318943

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 95.73%

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

💛 - Coveralls

@duncandewhurst
Copy link
Contributor Author

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
Copy link
Contributor Author

Oh, I forgot that open-contracting/standard_extension_template#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
Copy link
Contributor Author

Work in progress content

@duncandewhurst
Copy link
Contributor Author

@duncandewhurst
Copy link
Contributor Author

duncandewhurst commented Nov 5, 2024

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:

  • Resolve Flask error
  • Check list and blockquote formatting
  • Update id parameters and relative link targets
  • Format using Prettier

@duncandewhurst
Copy link
Contributor Author

duncandewhurst commented Nov 6, 2024

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

@jpmckinney
Copy link
Member

Needed to merge main.

@duncandewhurst
Copy link
Contributor Author

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

@duncandewhurst
Copy link
Contributor Author

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

…avoid weird whitespace in translatable strings
@jpmckinney jpmckinney marked this pull request as ready for review November 7, 2024 17:01
@jpmckinney
Copy link
Member

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
Copy link
Member

yolile commented Nov 7, 2024

Translated

@jpmckinney jpmckinney merged commit 4206060 into main Nov 7, 2024
8 checks passed
@jpmckinney jpmckinney deleted the add-docs branch November 7, 2024 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants