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

Fix hreflang in source alternate tag #270

Merged
merged 1 commit into from
Jun 14, 2024

Conversation

svaloumas
Copy link
Contributor

No description provided.

@svaloumas svaloumas force-pushed the TX-15429_fix_hreflang_in_source_alternate_tag branch from 4a6c5d4 to 9985657 Compare June 13, 2024 13:06
Copy link
Contributor

@foteinigk foteinigk left a comment

Choose a reason for hiding this comment

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

updated the plugin, so as source language is not saved at settings, I think we would

includes/lib/transifex-live-integration-hreflang.php Outdated Show resolved Hide resolved
includes/lib/transifex-live-integration-hreflang.php Outdated Show resolved Hide resolved
array_push( $ret, $arr );
$firstIteration = false;
Copy link
Contributor

Choose a reason for hiding this comment

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

Just a suggestion, if we would like to avoid declaring variable $firstIteration we could have the following

Suggested change
$firstIteration = false;
foreach ($languages as $Index => $language) {
.......
$arr['is_source'] = ($index === 0);
.......
}

NOTE: if someone has not updated the plugin yet and source language is not stored at settings, I think we would get the first target language as source

@svaloumas svaloumas force-pushed the TX-15429_fix_hreflang_in_source_alternate_tag branch 3 times, most recently from 6c30ec5 to c5bd7a0 Compare June 13, 2024 13:57
@svaloumas svaloumas force-pushed the TX-15429_fix_hreflang_in_source_alternate_tag branch from e007504 to 62f6289 Compare June 14, 2024 09:15
Copy link
Contributor

@foteinigk foteinigk left a comment

Choose a reason for hiding this comment

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

LGTM🥁🚀

@svaloumas svaloumas merged commit ea3f731 into devel Jun 14, 2024
1 check passed
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.

2 participants