Skip to content

Improve site-readiness for translations #112

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

Merged
merged 11 commits into from
Dec 23, 2021
Merged

Conversation

keunes
Copy link
Member

@keunes keunes commented Nov 10, 2021

Contributes to #111

@keunes keunes changed the title simplify lang-menu data Make site ready for semi-automated translations Nov 10, 2021
@keunes keunes requested a review from ByteHamster November 13, 2021 22:44
@keunes keunes marked this pull request as ready for review November 13, 2021 22:47
@keunes keunes changed the title Make site ready for semi-automated translations Improve site-readiness for translations Nov 13, 2021
Copy link
Member

@ByteHamster ByteHamster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few things I noticed when skimming (not a detailed review yet)

@keunes
Copy link
Member Author

keunes commented Nov 15, 2021

Hi @MichaelCurrin
Thanks again for your help with the simplification of the language menu over on the Jekyll forum. This is the PR I was working on (there's one commit that moves around a lot of files, which might be a bit distracting of the other changes). Much appreciated if you're willing to have a look, thanks a lot!

@keunes
Copy link
Member Author

keunes commented Dec 10, 2021

Hi @ByteHamster

Did you still want to have a look? I'd like to merge it soon so this is out of the way :-)

I've received help from an expert and it runs smoothly locally and on Netlify, so I'm comfortable also merging this without your review.

If we want a cleaner history, everything but b2574f7 could be squashed.

@ByteHamster
Copy link
Member

ByteHamster commented Dec 12, 2021

  • Please remove the German language from the menu. The translations there are just placeholders and not actual text. We don't want that to be indexed by Google.
  • The search function does not show the titles. I think this can be fixed in search.json
  • You renamed a link (auto_rewind to auto-rewind). There should be a redirect to the new URL.
  • Please explicitly mention the language in included images. When translating the pages, we then need to pay attention on either creating the translated images or keeping the English images. Like it currently is, we always use the localized version, even if it does not exist. Alternatively, maybe it would be possible to write a function that checks if the image exists in the target language and if it doesn't, just falls back to English. That would be the easiest method - then we can even add <!-- mdpo-disable -->
    • queue/lock.md
    • general/beta.md
    • general/gpodder.md
    • download.md
  • Translating the privacy policy is fine (with the "English prevails" sentence) but I still think that translating the license is not a good idea. I don't think there is much use for it and it could lead to problems. Licenses are worded carefully for a reason.

@keunes
Copy link
Member Author

keunes commented Dec 16, 2021

Thanks again @ByteHamster for the feedback!

You renamed a link (auto_rewind to auto-rewind). There should be a redirect to the new URL.

It's a sub-page in the documentation. If for every update we ever make to the documentation requires a redirect, it might get a rather long list. I think such not-prominent pages do not deserve redirects.

I still think that translating the license is not a good idea

The localised file has <!-- mdpo-disable --> above the license text, so it will not be translated.

I just discovered that there's a 'bug' in the menu rendering: the forum URL is prepended by the localised site URL. Once that's fixed as well, I'll commit the changes.

@keunes
Copy link
Member Author

keunes commented Dec 17, 2021

Ok, changes committed :)

Comment on lines +4 to +12
{% include image.html
alt="
<!-- mdpo-enable-next-line -->
devices

"
loc="/assets/images/documentation"
file="gpodder-devices.png"
%}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm this is indeed quite a bit of text. Would it be possible to only include the URL, not the full image? Or does that add whitespaces? Then we do not need the mdpo enable/disable code.

Something like:

![devices]({% include localized-documentation-image file="gpodder-devices.png" %})

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Downside is that there's a bigger chance that translators mess up, as they see the whole code rather than only the translatable text. Not sure whether risk of translators making a mistake is smaller/bigger than site code contributors. So I can change in line with your suggestion :)

Copy link
Member Author

@keunes keunes Dec 21, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It works but the URLs must be captured first, otherwise the images don't work, indeed due to spaces:

{% capture GP-url %}{% include image-url.liquid folder='badges' file='get-it-on-google-play.png' %}{% endcapture %}
[<img alt="Get it on Google Play" src="{{ GP-url | strip }}" height="80px"/>](https://play.google.com/store/apps/details?id=de.danoeh.antennapod)
![get on GP]({{ GP-url | strip }})
full image url only
capture only when code otherwise becomes hard to read and in lists always
translators deal only with text to translate see & have to copy md tag (html tag on download page)
code complexity more (particularly in md files) less

I'm inclined so use both includes: one for more full html image tags with class & size, one for url-only for md image tags.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, having two different includes could be more confusing than helpful for contributors. I would say let's just keep it the way it is now :)

@antennapod-bot
Copy link
Contributor

This pull request has been mentioned on AntennaPod Forum. There might be relevant details there:

https://forum.antennapod.org/t/whos-wrong-antenna-or-guardian/1573/16

Copy link
Member

@ByteHamster ByteHamster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the late reply and so much back-and-forth with this PR. Looks good to me now, ready to merge :)

Comment on lines +4 to +12
{% include image.html
alt="
<!-- mdpo-enable-next-line -->
devices

"
loc="/assets/images/documentation"
file="gpodder-devices.png"
%}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, having two different includes could be more confusing than helpful for contributors. I would say let's just keep it the way it is now :)

@keunes
Copy link
Member Author

keunes commented Dec 23, 2021

Yeey. Thanks a lot for the feedback!

@keunes
Copy link
Member Author

keunes commented Dec 23, 2021

Ah, actually: do you think we should/could squash into three commits?

  • Everything before
  • b2574f7 (where all the text gets moved to different files)
  • Everything after

With the feedback I made quite a few subsequent changes on the same things - merging stuff would make it easier to understand the changes. But this one commit is just a lot of moving text around which would make reading history harder.

No idea how to squash certain commits only, though (only know on web you can squash all).

@ByteHamster ByteHamster force-pushed the translation-readyness branch from 93f47f2 to a9cb33e Compare December 23, 2021 11:15
@ByteHamster
Copy link
Member

31b8eb9 moves a lot of files, too. I squashed the last few commits that just said "review corrections", "final corrections" etc ;)

@keunes keunes merged commit 7221575 into master Dec 23, 2021
@keunes keunes deleted the translation-readyness branch December 23, 2021 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants