Fix #3639: Favorite count pixiv tags aren't skipped by translated tags.
This commit is contained in:
@@ -83,6 +83,8 @@ module Sources
|
||||
|
||||
# Given a tag from the source site, should return an array of corresponding Danbooru tags.
|
||||
def translate_tag(untranslated_tag)
|
||||
return [] if untranslated_tag.blank?
|
||||
|
||||
translated_tag_names = WikiPage.active.other_names_equal(untranslated_tag).uniq.pluck(:title)
|
||||
translated_tag_names = TagAlias.to_aliased(translated_tag_names)
|
||||
translated_tags = Tag.where(name: translated_tag_names)
|
||||
|
||||
@@ -57,7 +57,7 @@ module Sources
|
||||
end
|
||||
|
||||
def translate_tag(tag)
|
||||
normalized_tag = tag.gsub(/\A(\S+?)_?\d+users入り\Z/i, '\1')
|
||||
normalized_tag = tag.gsub(/\d+users入り\z/i, "")
|
||||
|
||||
translated_tags = super(normalized_tag)
|
||||
if translated_tags.empty? && normalized_tag.include?("/")
|
||||
|
||||
Reference in New Issue
Block a user