Fix #3266: Normalize fullwidth Unicode characters in translated tags.

This commit is contained in:
evazion
2017-08-12 17:13:52 -05:00
parent ee38d82ba0
commit 9b031a9c20
3 changed files with 18 additions and 4 deletions

View File

@@ -87,7 +87,7 @@ module Sources
# Given a tag from the source site, should return an array of corresponding Danbooru tags.
def translate_tag(untranslated_tag)
translated_tags = Tag.where(name: WikiPage.active.other_names_equal([untranslated_tag]).uniq.select(:title))
translated_tags = Tag.where(name: WikiPage.active.other_names_equal(untranslated_tag).uniq.select(:title))
if translated_tags.empty?
normalized_name = TagAlias.to_aliased([Tag.normalize_name(untranslated_tag)])