lib/when_exe/locales/locale.rb in when_exe-0.3.8 vs lib/when_exe/locales/locale.rb in when_exe-0.3.9

- old
+ new

@@ -34,11 +34,12 @@ DefaultUnification = { '煕'=>'熙', '廣'=>'広', '寶'=>'宝', '國'=>'国', '應'=>'応', '觀'=>'観', '龜'=>'亀', '齊'=>'斉', '靈'=>'霊', '攝'=>'摂', '壽'=>'寿', '萬'=>'万', '廢'=>'廃', '顯'=>'顕', '會'=>'会', '聰'=>'聡', - '總'=>'総', '證'=>'証', '禮'=>'礼', '竜'=>'龍' + '總'=>'総', '證'=>'証', '禮'=>'礼', '與'=>'与', + '竜'=>'龍' } # Escape # @private Escape = { @@ -700,10 +701,10 @@ @names[locale] = name if ref =~ /\A(.+):/ prefix = namespace[$1] || Locale.send(:_namespaces)[$1] ref.sub!(/\A.+:/, prefix) if prefix end - ref += '%%<' + name + '>' if ref =~ /[\/#:]\z/ + ref += name =~ /\A<.+>\z/ ? '%%' + name : '%%<' + name + '>' if ref =~ /[\/#:]\z/ unless ref == '' @link[locale] = _encode(ref) # When.logger.info("%s[%s]->%s" % [@names[locale], locale, @link[locale]]) if When.logger end else ; raise ArgumentError, "Irregal locale format: " + v