Added two handed message to weapons (#9839)

* Added two handed message to weapons

* Added two handed message to content api

* Fixed static notes text. Added support for RTL
This commit is contained in:
Keith Holliday 2018-02-02 11:21:53 -07:00 committed by GitHub
parent 78ad1cd8b0
commit 803f63d991
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 46 additions and 3 deletions

View file

@ -32,6 +32,7 @@
div.clearfix(slot="modal-footer")
</template>
<style lang="scss">
@import '~client/assets/scss/colors.scss';

View file

@ -28,7 +28,7 @@ div
)
slot(name="popoverContent", :item="item")
equipmentAttributesPopover(
v-if="item.purchaseType==='gear'",
v-if="item.purchaseType === 'gear'",
:item="item"
)
div.questPopover(v-else-if="item.purchaseType === 'quests'")

View file

@ -128,7 +128,7 @@
"weaponSpecialSkiText": "Ski-sassin Pole",
"weaponSpecialSkiNotes": "A weapon capable of destroying hordes of enemies! It also helps the user make very nice parallel turns. Increases Strength by <%= str %>. Limited Edition 2013-2014 Winter Gear.",
"weaponSpecialCandycaneText": "Candy Cane Staff",
"weaponSpecialCandycaneNotes": "A powerful mage's staff. Powerfully DELICIOUS, we mean! Two-handed weapon. Increases Intelligence by <%= int %> and Perception by <%= per %>. Limited Edition 2013-2014 Winter Gear.",
"weaponSpecialCandycaneNotes": "A powerful mage's staff. Powerfully DELICIOUS, we mean! Increases Intelligence by <%= int %> and Perception by <%= per %>. Limited Edition 2013-2014 Winter Gear.",
"weaponSpecialSnowflakeText": "Snowflake Wand",
"weaponSpecialSnowflakeNotes": "This wand sparkles with unlimited healing power. Increases Intelligence by <%= int %>. Limited Edition 2013-2014 Winter Gear.",
@ -1591,5 +1591,6 @@
"eyewearMystery301703Notes": "Perfect for a fancy masquerade or for stealthily moving through a particularly well-dressed crowd. Confers no benefit. March 3017 Subscriber Item.",
"eyewearArmoirePlagueDoctorMaskText": "Plague Doctor Mask",
"eyewearArmoirePlagueDoctorMaskNotes": "An authentic mask worn by the doctors who battle the Plague of Procrastination. Confers no benefit. Enchanted Armoire: Plague Doctor Set (Item 2 of 3)."
"eyewearArmoirePlagueDoctorMaskNotes": "An authentic mask worn by the doctors who battle the Plague of Procrastination. Confers no benefit. Enchanted Armoire: Plague Doctor Set (Item 2 of 3).",
"twoHandedItem": "Two-handed item."
}

View file

@ -1,3 +1,5 @@
import t from '../translation';
import {weapon as baseWeapon} from './sets/base';
import {weapon as healerWeapon} from './sets/healer';
@ -22,4 +24,43 @@ let weapon = {
armoire: armoireWeapon,
};
// Add Two Handed message to all weapons
const rtlLanguages = [
'ae', /* Avestan */
'ar', /* 'العربية', Arabic */
'arc', /* Aramaic */
'bcc', /* 'بلوچی مکرانی', Southern Balochi */
'bqi', /* 'بختياري', Bakthiari */
'ckb', /* 'Soranî / کوردی', Sorani */
'dv', /* Dhivehi */
'fa', /* 'فارسی', Persian */
'glk', /* 'گیلکی', Gilaki */
'he', /* 'עברית', Hebrew */
'ku', /* 'Kurdî / كوردی', Kurdish */
'mzn', /* 'مازِرونی', Mazanderani */
'nqo', /* N'Ko */
'pnb', /* 'پنجابی', Western Punjabi */
'ps', /* 'پښتو', Pashto, */
'sd', /* 'سنڌي', Sindhi */
'ug', /* 'Uyghurche / ئۇيغۇرچە', Uyghur */
'ur', /* 'اردو', Urdu */
'yi', /* 'ייִדיש', Yiddish */
];
for (let key in weapon) {
const set = weapon[key];
for (let weaponKey in set) {
const item = set[weaponKey];
const oldnotes = item.notes;
item.notes = (lang) => {
const twoHandedText = item.twoHanded ? t('twoHandedItem')(lang) : '';
if (rtlLanguages.indexOf(lang) !== -1) {
return `${twoHandedText} ${oldnotes(lang)}`;
}
return `${oldnotes(lang)} ${twoHandedText}`;
};
}
}
module.exports = weapon;