Skip to content

Error differentiating between Chinese Yuan (renminbi) and Japanese Yen #20

Description

@jmvalente

Sorry for two separate bugs within a few hours, I noticed this one as well.

Things priced in Chinese renmibi can be either suffixed with 元 for the unit of one yuan or prefixed with ¥ for the same unit.

Two examples for a more clear explanation of what happens.
http://item.mi.com/buymitv/48 When 元 is appended to the price, time-prices doesn't seem to recognize it as a currency.

Alternatively, if the item is priced pretending ¥, the extension treats it as if it were referring to the Japanese Yen, instead. See Taobao as an example https://world.taobao.com/item/41206578905.htm?fromSite=main&ali_refid=a3_430618_1006:1104072917:N:%E5%A1%9E%E8%A7%84:47ea77789a4a5a9ea561784ec260c34b&ali_trackid=1_47ea77789a4a5a9ea561784ec260c34b (click on TR120*6 for one that is 1500yuan).

Using the example of ¥1500, you'd have a value equal to $218.4USD if you assume it is Chinese Renminbi while assuming Japanese Yen, would have a dollar value of only $13.30USD. Vastly different values.

For the former, it'd be a matter of adding code to check for a symbol after the amount (which would also fix and allow pricing from EU countries like France and Germany that place the euro symbol after the amount), while the latter is far more tricky and possibly not worth the effort if few users are viewing Chinese prices. My only guess is detecting the language used on the site to infer.

Alternatively, it can argued that CNY is not in the supported currencies so it's not an issue.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions