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

[Bug] hreflang codes contain unrecognised undersores #977

Closed
gilgongo opened this issue Dec 21, 2023 · 10 comments
Closed

[Bug] hreflang codes contain unrecognised undersores #977

gilgongo opened this issue Dec 21, 2023 · 10 comments
Assignees
Labels
bug Something isn't working

Comments

@gilgongo
Copy link
Member

gilgongo commented Dec 21, 2023

The Google SEO report for jamulus.io says there is a problem with "unknown language codes" in some links using the "hreflang" property. This is used in the language switcher, specifically zh_CN, nb_NO, ko_KR, pt_BR, pt_PT.

It seems that if we can change the UI to show for example "zh-CN" and not "zh_CN", that would fix it.

I don't know how much of a problem this is for displaying content in the relevant Google geographic regions though, but it may be worth fixing.

PS: Google is probably picking it up from sitemap.xml in fact. See my comment below.

@gilgongo gilgongo added the bug Something isn't working label Dec 21, 2023
@github-project-automation github-project-automation bot moved this to Triage in Tracking Dec 21, 2023
@ignotus666
Copy link
Contributor

I'll look into it when I get some time. Shouldn't be too hard, just a bit tedious.

@gilgongo

This comment was marked as resolved.

@pljones pljones added this to the Release 3.11.0 milestone Jun 3, 2024
@pljones pljones moved this from Triage to Backlog in Tracking Jun 3, 2024
@gilgongo
Copy link
Member Author

gilgongo commented Jun 5, 2024

See also this related issue.

@gilgongo gilgongo self-assigned this Jun 5, 2024
@gilgongo
Copy link
Member Author

gilgongo commented Jun 6, 2024

I think this problem seems to come from something that po4a-create-all-targets.sh is doing with $lang. At least, I can fix it manually my re-naming stuff, but running the script sets it back again (and breaks it).

@ignotus666
Copy link
Contributor

@gilgongo are you also re-naming the folders in _translator-files/po/? That's where $lang gets the language codes from.

@gilgongo
Copy link
Member Author

gilgongo commented Jun 6, 2024

@gilgongo are you also re-naming the folders in _translator-files/po/? That's where $lang gets the language codes from.

Ah yes, but I confused myself with the symlinks in the next-release branch. I think I've sorted it now but need to check.

@ignotus666
Copy link
Contributor

ignotus666 commented Jun 6, 2024

Yeah, there's the "1-xx-index.md" files, the folders in /assets/img/ and _translator-files/po/, a regex that needs to be changed in /.github/workflows/add-lang.yml (line 21, change the underscore to a -), and then the language code in all the po files for the languages where it's changed. Oh, and the relevant line in _config.yml. I think that's it but there may be more. I'm not sure how Weblate will react too, but we'll get to that.

@gilgongo
Copy link
Member Author

gilgongo commented Jun 7, 2024

@ignotus666 OK so now that all seems to be working on my local machine (and I did a link check just in case), does this need to go to release or next-release? I've got a branch on my fork made from next-release (which seems to have some commits relating to the symlinks I'm changing?)

@ignotus666
Copy link
Contributor

I'd say it should go to next-release.

@gilgongo gilgongo moved this from Backlog to Waiting on Team in Tracking Jun 7, 2024
@pljones pljones moved this from Waiting on Team to In Progress in Tracking Jun 21, 2024
@gilgongo
Copy link
Member Author

Closing as now incorporated in #993

@github-project-automation github-project-automation bot moved this from In Progress to Done in Tracking Jun 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

No branches or pull requests

3 participants