Closed (fixed)
Project:
XML sitemap
Version:
8.x-1.x-dev
Component:
xmlsitemap.module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
7 Feb 2017 at 10:30 UTC
Updated:
5 Oct 2022 at 21:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
cyberwolf commentedComment #3
dave reidComment #4
mrinalini9 commentedRerolled patch #2 as it failed to apply, please review.
Comment #8
Zenovii_Kholyavka commentedI fixed test related translations and added changes which was added by @mrinalini9. Please review.
Comment #9
Andrii Kleba commented@Zenovii_Kholyvka works as expected, thanks
Comment #10
renatog commentedI've checked and it really works well. Thank you so much
Comment #12
renatog commentedMoved to the dev branch.
Thank you so much for your contribution
Comment #14
dave reidWhy did these translations need context on them? Each word is pretty generic, I wouldn't think it would be necessary.
Comment #15
dave reidFollowing on https://www.drupal.org/docs/7/api/localization-api/string-context I don't see why the context is necessary. Maybe "always" but even then I'm doubtful.
Comment #16
dave reidI removed the contexts for most of these and updated the context for "always" to "At all times" and for "never" to "At no time" (also never was missing translation). Also the sitemap generation needs an untranslated string at all times, so I needed to add a parameter to return the raw string value instead of the translated string.
Comment #17
lonaloreI downgraded the module back to v1.2 on my websites because Google invalidated all URLs due to (bad hungarian?) translation. Please add a context to all of the changefreq translations, or please provide an option to disable translation.
Comment #18
dave reid@lonalore You're not on the latest release, this was fixed in the 1.3 release.
Comment #19
lonaloreI upgraded the module to v1.3 again, and I get invalid sitemap.xml now.
Module:
Generated sitemap:
https://www.erettsegitetel.hu/sitemap.xml
As I see it, the bug may be that the xmlsitemap_get_changefreq() function is called with 1 parameter everywhere, and the second parameter is TRUE by default, so changefreq is translated in all cases.
Comment #20
lonaloreGoogle Search Console says that all links are invalid due to the changefreq.
Comment #21
dave reidYup you're right, I shouldn't have changed the default option for xmlsitemap_get_changefreq_options() to return the translated string by default, it should return the untranslated string by default. Patch fixes the issue and has test coverage.
Comment #22
dave reidComment #24
dave reidCommitted #21 to 8.x-1.x and will release today or tomorrow.