How to handle mismatches of XML tags in same version? #2556

Open
opened 2022-04-12 08:49:38 +00:00 by max.mehl · 1 comment
Owner

In 99% of the cases, all files with the same <version> number should have the same XML structure. I found out that with a lot of files this is not the case. I wonder how we should handle this.

Attached you will find the full list of files, appended by the XML tags that are mismatching. Currently, there is no distinction whether a tag of a translation has been added or is missing in comparison with the EN file. It obviously also does not check whether the content matches.

I am not sure how we should handle this. Going through all files and fixing them manually is not feasible.

  • But we could just increment the version counter for the EN files and the translations that are in sync.
  • Or we could ignore it completely
  • Or we just ignore old events and news (and perhaps activities), and manually check a few important files (like in /freesoftware).
  • In addition, we could add this check to the pre-commit hook (in a cleaner form obviously).

Background: I started this as a simple pre-commit check to detect whether an editor of the EN version should update the version number, as a change of the XML structure definitely should be transposed to updated translations.

For reference, I used these scripts that are far from perfect but were just a quick hack to check the whole repo. I then used this command to run it over all relevant files: find . -type f \( -iname "*.en.xhtml" -o -iname "*.en.xml" \) -exec tools/compare-xml-structure.sh {} \;

In 99% of the cases, all files with the same `<version>` number should have the same XML structure. I found out that with *a lot* of files this is not the case. I wonder how we should handle this. Attached you will find the full list of files, appended by the XML tags that are mismatching. Currently, there is no distinction whether a tag of a translation has been added or is missing in comparison with the EN file. It obviously also does not check whether the content matches. I am not sure how we should handle this. Going through all files and fixing them manually is not feasible. * But we could just increment the version counter for the EN files and the translations that are in sync. * Or we could ignore it completely * Or we just ignore old events and news (and perhaps activities), and manually check a few important files (like in /freesoftware). * In addition, we could add this check to the pre-commit hook (in a cleaner form obviously). Background: I started this as a simple pre-commit check to detect whether an editor of the EN version should update the version number, as a change of the XML structure definitely should be transposed to updated translations. For reference, I used [these scripts](https://git.fsfe.org/FSFE/fsfe-website/compare/master...compare-xml-structure) that are far from perfect but were just a quick hack to check the whole repo. I then used this command to run it over all relevant files: `find . -type f \( -iname "*.en.xhtml" -o -iname "*.en.xml" \) -exec tools/compare-xml-structure.sh {} \;`
max.mehl added the
bug
help wanted
question
text
labels 2022-04-12 08:49:38 +00:00
Member

Hello @max.mehl ,
I tried to do the job manually for the "about" section (pull request #2561 ), and I think it could be feaseable to proceed manually (we can leave old news/event as last).
Most of the pages were fixed, for few I updated the version number in the English and up-to-date versions.

There is only one page left untouched: /about/people/albers/albers.de.xhtml
Since this page has only DE translation and a "strong" tag was added, maybe it could be the EN page that should be updated/fixed (maybe @eal could fix DE or EN version).

For some other pages, the tags mismatch was generated by WebPreview, since some tags could be added/replaced when, for example, someone copy/paste into webpreview. I will fix them.

Hello @max.mehl , I tried to do the job manually for the "about" section (pull request #2561 ), and I think it could be feaseable to proceed manually (we can leave old news/event as last). Most of the pages were fixed, for few I updated the version number in the English and up-to-date versions. There is only one page left untouched: /about/people/albers/albers.de.xhtml Since this page has only DE translation and a "strong" tag was added, maybe it could be the EN page that should be updated/fixed (maybe @eal could fix DE or EN version). For some other pages, the tags mismatch was generated by WebPreview, since some tags could be added/replaced when, for example, someone copy/paste into webpreview. I will fix them.
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: FSFE/fsfe-website#2556
No description provided.