{"action":"created","issue":{"url":"https://api.github.com/repos/solidusio/solidus/issues/914","repository_url":"https://api.github.com/repos/solidusio/solidus","labels_url":"https://api.github.com/repos/solidusio/solidus/issues/914/labels{/name}","comments_url":"https://api.github.com/repos/solidusio/solidus/issues/914/comments","events_url":"https://api.github.com/repos/solidusio/solidus/issues/914/events","html_url":"https://github.com/solidusio/solidus/pull/914","id":136682391,"number":914,"title":"Use better i18n for generating tax adjustment labels","user":{"login":"mamhoff","id":703401,"avatar_url":"https://avatars.githubusercontent.com/u/703401?v=3","gravatar_id":"","url":"https://api.github.com/users/mamhoff","html_url":"https://github.com/mamhoff","followers_url":"https://api.github.com/users/mamhoff/followers","following_url":"https://api.github.com/users/mamhoff/following{/other_user}","gists_url":"https://api.github.com/users/mamhoff/gists{/gist_id}","starred_url":"https://api.github.com/users/mamhoff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mamhoff/subscriptions","organizations_url":"https://api.github.com/users/mamhoff/orgs","repos_url":"https://api.github.com/users/mamhoff/repos","events_url":"https://api.github.com/users/mamhoff/events{/privacy}","received_events_url":"https://api.github.com/users/mamhoff/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-02-26T12:14:34Z","updated_at":"2016-02-26T12:42:52Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/solidusio/solidus/pulls/914","html_url":"https://github.com/solidusio/solidus/pull/914","diff_url":"https://github.com/solidusio/solidus/pull/914.diff","patch_url":"https://github.com/solidusio/solidus/pull/914.patch"},"body":"The previous code for generating tax adjustment labels has several\r\ndrawbacks:\r\n\r\n* The i18n keys used are not namespaced\r\n* The i18n in place did not allow the main app to specify\r\n  the number format, which is bad for Europe, where we often\r\n  write numbers different than the US (1,40 Euro, anyone?)\r\n* The code in place did not allow the format of the label\r\n  to be anything different from what was in Spree::TaxRate#create_label.\r\n* The code on place relied on MRI interpreter quirks (namely that a\r\n  variable in an untouched `if` branch would become `nil` rather\r\n  than raising a `NoMethodError`).\r\n\r\nIn the future, adjustments should IMO not actually store their translations\r\nin the database at all, but instead create them using their own data. But\r\nthat's not something I want to tackle now."},"comment":{"url":"https://api.github.com/repos/solidusio/solidus/issues/comments/189259963","html_url":"https://github.com/solidusio/solidus/pull/914#issuecomment-189259963","issue_url":"https://api.github.com/repos/solidusio/solidus/issues/914","id":189259963,"user":{"login":"mamhoff","id":703401,"avatar_url":"https://avatars.githubusercontent.com/u/703401?v=3","gravatar_id":"","url":"https://api.github.com/users/mamhoff","html_url":"https://github.com/mamhoff","followers_url":"https://api.github.com/users/mamhoff/followers","following_url":"https://api.github.com/users/mamhoff/following{/other_user}","gists_url":"https://api.github.com/users/mamhoff/gists{/gist_id}","starred_url":"https://api.github.com/users/mamhoff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mamhoff/subscriptions","organizations_url":"https://api.github.com/users/mamhoff/orgs","repos_url":"https://api.github.com/users/mamhoff/repos","events_url":"https://api.github.com/users/mamhoff/events{/privacy}","received_events_url":"https://api.github.com/users/mamhoff/received_events","type":"User","site_admin":false},"created_at":"2016-02-26T12:42:52Z","updated_at":"2016-02-26T12:42:52Z","body":"That would require quite a bit of work, also in Promotions. I think I want to see how the discussion about removing taxes from adjustments generally pans out. If you look at #904, that's how I'd like to see it done in the future. "}}