Skip to content

Commit be99618

Browse files
committed
Convert none ascii characters safely to their ASCII representation
Relates-to: #180
1 parent 3675a87 commit be99618

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@ source "https://rubygems.org"
22

33
gem "rake", "~> 10.3.2"
44
gem "minitest", "~> 5.3.5"
5+
gem "i18n", "~> 1.8.5"
56

67
gemspec

db/dump.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
# frozen_string_literal: true
22

3+
require "i18n"
34
require 'emoji'
45
require 'json'
56
require_relative './emoji-test-parser'
67

8+
I18n.config.available_locales = :en
79
items = []
810

911
_, categories = EmojiTestParser.parse(File.expand_path("../../vendor/unicode-emoji-test.txt", __FILE__))
@@ -34,7 +36,7 @@
3436
)
3537
else
3638
output_item.update(
37-
aliases: [description.gsub(/\W+/, '_').downcase],
39+
aliases: [I18n.transliterate(description).gsub(/\W+/, '_').downcase],
3840
tags: [],
3941
unicode_version: "13.0",
4042
ios_version: "14.0",

0 commit comments

Comments
 (0)