Fix #4016: Translated tags failing to find some tags.
* Normalize spaces to underscores when saving other names. Preserve case since case can be significant. * Fix WikiPage#other_names_include to search case-insensitively (note: this prevents using the index). * Fix sources to return the raw tags in `#tags` and the normalized tags in `#normalized_tags`. The normalized tags are the tags that will be matched against other names.
This commit is contained in:
@@ -56,7 +56,8 @@ module Sources
|
||||
end
|
||||
|
||||
should "get the tags" do
|
||||
assert_equal(%w[gantz reika], @site.tags.map(&:first))
|
||||
assert_equal(%w[gantz Reika], @site.tags.map(&:first))
|
||||
assert_equal(%w[gantz reika], @site.normalized_tags)
|
||||
end
|
||||
|
||||
should "get the artist commentary" do
|
||||
@@ -74,6 +75,11 @@ module Sources
|
||||
url = "https://cdna.artstation.com/p/assets/images/images/000/144/922/large/cassio-yoshiyaki-cody2backup2-yoshiyaki.jpg?1406314198"
|
||||
assert_equal(url, @site.image_url)
|
||||
end
|
||||
|
||||
should "get the tags" do
|
||||
assert_equal(["Street Fighter", "Cody", "SF"].sort, @site.tags.map(&:first).sort)
|
||||
assert_equal(["street_fighter", "cody", "sf"].sort, @site.normalized_tags.sort)
|
||||
end
|
||||
end
|
||||
|
||||
context "The source site for a http://cdna.artstation.com/p/assets/... url" do
|
||||
|
||||
Reference in New Issue
Block a user