Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
To make sure the same mistake won't happen again, I first converted the en.json file to use newlines instead of `|` using the following js snippet: ```js JSON.stringify(Object.entries(en).map(([name,data])=>({name,value:data.split('|')}))) ``` Then translated it this way: ```json [ { "name": "name", "value": [ "Farsi" ] }, { "name": "months", "value": [ "ژانویه", "فوریه", "مارس", "آوریل", "مه", "ژوئن", "ژوئیه", "اوت", "سپتامبر", "اکتبر", "نوامبر", "دسامبر" ] }, { "name": "short_months", "value": [ "ژانویه", "فوریه", "مارس", "آوریل", "مه", "ژوئن", "ژوئیه", "اوت", "سپتامبر", "اکتبر", "نوامبر", "دسامبر" ] }, { "name": "weeks", "value": [ "یکشنبه", "دوشنبه", "سهشنبه", "چهارشنبه", "پنجشنبه", "جمعه", "شنبه" ] }, { "name": "short_weeks", "value": [ "یکشنبه", "دوشنبه", "سهشنبه", "چهارشنبه", "پنجشنبه", "جمعه", "شنبه" ] }, { "name": "seasons", "value": [ "بهار", "تابستان", "پاییز", "زمستان" ] }, { "name": "constellations", "value": [ "قوچ", "گاو نر", "دو پیکر", "خرچنگ", "شیر", "خوشه", "ترازو", "عقرب", "کماندار", "بز", "آبریز", "ماهی" ] }, { "name": "year", "value": [ "1 سال", "%d سال" ] }, { "name": "month", "value": [ "1 ماه", "%d ماه" ] }, { "name": "week", "value": [ "1 هفته", "%d هفته" ] }, { "name": "day", "value": [ "1 روز", "%d روز" ] }, { "name": "hour", "value": [ "1 ساعت", "%d ساعت" ] }, { "name": "minute", "value": [ "1 دقیقه", "%d دقیقه" ] }, { "name": "second", "value": [ "1 ثانیه", "%d ثانیه" ] }, { "name": "now", "value": [ "همین الان" ] }, { "name": "ago", "value": [ "%s پیش" ] }, { "name": "from_now", "value": [ "در %s" ] }, { "name": "before", "value": [ "%s قبل" ] }, { "name": "after", "value": [ "%s بعد" ] } ] ``` Then converted it back using: ```js JSON.stringify(x.reduce((a,e)=>(a[e.name]=e.value.join('|'),a), {})) ``` from the diff it seems there were more issues with order of month/days as well. in general I don't recommend merging values and using non-standard separators. this could've been avoided if the format defined months as an array and used separate keys for one vs many cases.
- Loading branch information