Page MenuHomeFreeBSD

[docs] tools/ Add fixups

Authored by fernape on Wed, Sep 8, 3:48 PM.



Add fixups for several chores we needed to do by hand.

  • Fix tags: and trademarks: lists
  • Fix paths to point to the concerned language and not to master (articles only)
Test Plan

Before this patch, running po4translate via will overwrite
includes and sourround tags and trademarks lists with single quotes. Running
git diff confirms this.

With this sed substitutions those changes are overwritten again by the script
so they restore the language-specific includes and such

Diff Detail

R9 FreeBSD doc repository
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

fernape created this revision.
dbaio requested changes to this revision.Thu, Sep 9, 12:12 AM

Good idea, thanks for this Fernando.

Let's improve this for matching many includes as we can.


Add your info here.


Please, change this comment to something like this:

# This is a temporary fix for po4a-translate command
# po4a: Fix YAML Front Matter / tags and trademarks
# $1: Fix to fix

In a few cases you mean?


Probably this can be used for all .adoc files, including books.
Will need to add another sed's.
So, you can rename the function name to fixup_includes() if you are ok with it.

I can help testing documentation pt-br, here are some examples:

-:chapters-path: content/pt-br/books/fdp-primer/
+:chapters-path: content/en/books/fdp-primer/

This revision now requires changes to proceed.Thu, Sep 9, 12:12 AM

File to fix*

Adopt Danilo's suggestions.

  • Add my contact info so I can be blamed properly
  • Improve comments
  • Apply susbtitutions in books too
  • Add some additional substitutions
fernape added inline comments.

Yes in my mind was "most cases" for just the couple of articles I translated :-)


fixup_includes is now run unconditionally. Will you give it a try?

@fernape I've just tested... it's great.
Thanks again.

This revision is now accepted and ready to land.Thu, Sep 9, 8:27 PM
This revision was automatically updated to reflect the committed changes.
fernape marked 2 inline comments as done.