airbnb / polyglot.js

Give your JavaScript the ability to speak many languages.
http://airbnb.github.io/polyglot.js
BSD 2-Clause "Simplified" License
3.71k stars 208 forks source link

Interpolation options #106

Closed tadam313 closed 6 years ago

tadam313 commented 6 years ago

Hi, @ljharb I'm keen to get the custom interpolation pattern feature merged from #64. As that PR is discontinued, I'm transferring that workstream here, see my proposed solution. Let's continue the discussion here.

tadam313 commented 6 years ago

thanks for the quick review and the rebase! I've made the requested changes and added some additional tests. Also realized the custom interpolation token could conflict with the pluralization delimiter, so in that case we throw an error (this is also covered with tests).

tadam313 commented 6 years ago

@ljharb is it in a good shape to merge or do you have any other requests?