poe-i18n
Version:
i18n utility for Path of Exile
29 lines (28 loc) • 873 B
JavaScript
var __read = (this && this.__read) || function (o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
if (!m) return o;
var i = m.call(o), r, ar = [], e;
try {
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
}
catch (error) { e = { error: error }; }
finally {
try {
if (r && !r.done && (m = i["return"])) m.call(i);
}
finally { if (e) throw e.error; }
}
return ar;
};
var default_gender = 'N';
var default_plural = 'S';
export default function inflectionIdentifier(context) {
var _a;
var inflection = context.inflection;
var gender;
var plural;
if (inflection != null) {
_a = __read(inflection.split(''), 2), gender = _a[0], plural = _a[1];
}
return [gender || default_gender, plural || default_plural].join('');
}