diff --git a/app/core/Router.coffee b/app/core/Router.coffee index 8174a1f7c..ddfd47788 100644 --- a/app/core/Router.coffee +++ b/app/core/Router.coffee @@ -79,6 +79,7 @@ module.exports = class CocoRouter extends Backbone.Router 'i18n/component/:handle': go('i18n/I18NEditComponentView') 'i18n/level/:handle': go('i18n/I18NEditLevelView') 'i18n/achievement/:handle': go('i18n/I18NEditAchievementView') + 'i18n/campaign/:handle': go('i18n/I18NEditCampaignView') 'legal': go('LegalView') diff --git a/app/locale/ar.coffee b/app/locale/ar.coffee index 3046f7cfa..0ec171858 100644 --- a/app/locale/ar.coffee +++ b/app/locale/ar.coffee @@ -68,9 +68,6 @@ module.exports = nativeDescription: "العربية", englishDescription: "Arabi # change_hero: "Change Hero" # Go back from choose inventory to choose hero # choose_inventory: "Equip Items" # buy_gems: "Buy Gems" -# campaign_desert: "Desert Campaign" -# campaign_forest: "Forest Campaign" -# campaign_dungeon: "Dungeon Campaign" # subscription_required: "Subscription Required" # free: "Free" # subscribed: "Subscribed" diff --git a/app/locale/bg.coffee b/app/locale/bg.coffee index 485c9910b..0608e95fa 100644 --- a/app/locale/bg.coffee +++ b/app/locale/bg.coffee @@ -68,9 +68,6 @@ module.exports = nativeDescription: "български език", englishDescri # change_hero: "Change Hero" # Go back from choose inventory to choose hero # choose_inventory: "Equip Items" buy_gems: "Купи скъпоценни камъни" -# campaign_desert: "Desert Campaign" -# campaign_forest: "Forest Campaign" -# campaign_dungeon: "Dungeon Campaign" # subscription_required: "Subscription Required" # free: "Free" # subscribed: "Subscribed" diff --git a/app/locale/ca.coffee b/app/locale/ca.coffee index 3bdb5766f..3dce77739 100644 --- a/app/locale/ca.coffee +++ b/app/locale/ca.coffee @@ -68,9 +68,6 @@ module.exports = nativeDescription: "Català", englishDescription: "Catalan", tr change_hero: "Canviar heroi" # Go back from choose inventory to choose hero choose_inventory: "Equipar objectes" buy_gems: "Comprar Gemes" - campaign_desert: "Campanya del desert" - campaign_forest: "Campanya del Bosc" - campaign_dungeon: "Campanya de la Masmorra" subscription_required: "Subscripció necessària" free: "Gratuit" subscribed: "Subscrit" diff --git a/app/locale/cs.coffee b/app/locale/cs.coffee index 1841766ee..1abf6a37b 100644 --- a/app/locale/cs.coffee +++ b/app/locale/cs.coffee @@ -68,9 +68,6 @@ module.exports = nativeDescription: "čeština", englishDescription: "Czech", tr change_hero: "Změnit hrdinu" # Go back from choose inventory to choose hero choose_inventory: "Vyzbrojit se předměty" buy_gems: "Zakoupit drahokamy" - campaign_desert: "Pouštní kampaň" - campaign_forest: "Lesní kampaň" - campaign_dungeon: "Jeskynní kampaň" subscription_required: "Předplatné vyžadováno" free: "Zdarma" subscribed: "Předplaceno" diff --git a/app/locale/da.coffee b/app/locale/da.coffee index 166da1912..7cb976231 100644 --- a/app/locale/da.coffee +++ b/app/locale/da.coffee @@ -68,9 +68,6 @@ module.exports = nativeDescription: "dansk", englishDescription: "Danish", trans # change_hero: "Change Hero" # Go back from choose inventory to choose hero # choose_inventory: "Equip Items" # buy_gems: "Buy Gems" -# campaign_desert: "Desert Campaign" -# campaign_forest: "Forest Campaign" -# campaign_dungeon: "Dungeon Campaign" # subscription_required: "Subscription Required" # free: "Free" # subscribed: "Subscribed" diff --git a/app/locale/de-AT.coffee b/app/locale/de-AT.coffee index 2e3ef6179..18b68adcd 100644 --- a/app/locale/de-AT.coffee +++ b/app/locale/de-AT.coffee @@ -68,9 +68,6 @@ module.exports = nativeDescription: "Deutsch (Österreich)", englishDescription: change_hero: "Held wechseln" # Go back from choose inventory to choose hero choose_inventory: "Gegenstände ausrüsten" buy_gems: "Juwelen kaufen" - campaign_desert: "Wüsten Kampagne" - campaign_forest: "Wald Kampagne" - campaign_dungeon: "Dungeon Kampagne" # subscription_required: "Subscription Required" free: "Gratis" # subscribed: "Subscribed" diff --git a/app/locale/de-CH.coffee b/app/locale/de-CH.coffee index 3e0db3d25..cdc90185b 100644 --- a/app/locale/de-CH.coffee +++ b/app/locale/de-CH.coffee @@ -68,9 +68,6 @@ module.exports = nativeDescription: "Deutsch (Schweiz)", englishDescription: "Ge change_hero: "Held wächsle" # Go back from choose inventory to choose hero # choose_inventory: "Equip Items" # buy_gems: "Buy Gems" -# campaign_desert: "Desert Campaign" -# campaign_forest: "Forest Campaign" -# campaign_dungeon: "Dungeon Campaign" # subscription_required: "Subscription Required" # free: "Free" # subscribed: "Subscribed" diff --git a/app/locale/de-DE.coffee b/app/locale/de-DE.coffee index 3f9a842a0..c4fb82d47 100644 --- a/app/locale/de-DE.coffee +++ b/app/locale/de-DE.coffee @@ -68,9 +68,6 @@ module.exports = nativeDescription: "Deutsch (Deutschland)", englishDescription: change_hero: "Held wechseln" # Go back from choose inventory to choose hero choose_inventory: "Gegenstände ausrüsten" buy_gems: "Edelsteine kaufen" - campaign_desert: "Wüstenkampagne" - campaign_forest: "Waldkampagne" - campaign_dungeon: "Kerkerkampagne" subscription_required: "Abonnement benötigt" free: "Kostenlos" subscribed: "Abonniert" diff --git a/app/locale/el.coffee b/app/locale/el.coffee index 90a15556d..ba95c55bf 100644 --- a/app/locale/el.coffee +++ b/app/locale/el.coffee @@ -68,9 +68,6 @@ module.exports = nativeDescription: "Ελληνικά", englishDescription: "Gre # change_hero: "Change Hero" # Go back from choose inventory to choose hero choose_inventory: "Εξοπλίσου με Αντικείμενα" # buy_gems: "Buy Gems" -# campaign_desert: "Desert Campaign" -# campaign_forest: "Forest Campaign" -# campaign_dungeon: "Dungeon Campaign" # subscription_required: "Subscription Required" # free: "Free" # subscribed: "Subscribed" diff --git a/app/locale/en-AU.coffee b/app/locale/en-AU.coffee index ca521867c..b58b924e8 100644 --- a/app/locale/en-AU.coffee +++ b/app/locale/en-AU.coffee @@ -68,9 +68,6 @@ module.exports = nativeDescription: "English (AU)", englishDescription: "English # change_hero: "Change Hero" # Go back from choose inventory to choose hero # choose_inventory: "Equip Items" # buy_gems: "Buy Gems" -# campaign_desert: "Desert Campaign" -# campaign_forest: "Forest Campaign" -# campaign_dungeon: "Dungeon Campaign" # subscription_required: "Subscription Required" # free: "Free" # subscribed: "Subscribed" diff --git a/app/locale/en-GB.coffee b/app/locale/en-GB.coffee index 678377a36..f2516d5d1 100644 --- a/app/locale/en-GB.coffee +++ b/app/locale/en-GB.coffee @@ -68,9 +68,6 @@ module.exports = nativeDescription: "English (UK)", englishDescription: "English # change_hero: "Change Hero" # Go back from choose inventory to choose hero # choose_inventory: "Equip Items" # buy_gems: "Buy Gems" -# campaign_desert: "Desert Campaign" -# campaign_forest: "Forest Campaign" -# campaign_dungeon: "Dungeon Campaign" # subscription_required: "Subscription Required" # free: "Free" # subscribed: "Subscribed" diff --git a/app/locale/en-US.coffee b/app/locale/en-US.coffee index 98a483b8f..a9ce8efb8 100644 --- a/app/locale/en-US.coffee +++ b/app/locale/en-US.coffee @@ -68,9 +68,6 @@ module.exports = nativeDescription: "English (US)", englishDescription: "English # change_hero: "Change Hero" # Go back from choose inventory to choose hero # choose_inventory: "Equip Items" # buy_gems: "Buy Gems" -# campaign_desert: "Desert Campaign" -# campaign_forest: "Forest Campaign" -# campaign_dungeon: "Dungeon Campaign" # subscription_required: "Subscription Required" # free: "Free" # subscribed: "Subscribed" diff --git a/app/locale/en.coffee b/app/locale/en.coffee index 8568569b2..70254a39e 100644 --- a/app/locale/en.coffee +++ b/app/locale/en.coffee @@ -68,9 +68,6 @@ change_hero: "Change Hero" # Go back from choose inventory to choose hero choose_inventory: "Equip Items" buy_gems: "Buy Gems" - campaign_desert: "Desert Campaign" - campaign_forest: "Forest Campaign" - campaign_dungeon: "Dungeon Campaign" subscription_required: "Subscription Required" free: "Free" subscribed: "Subscribed" diff --git a/app/locale/es-419.coffee b/app/locale/es-419.coffee index d1eda2836..2b1bf991c 100644 --- a/app/locale/es-419.coffee +++ b/app/locale/es-419.coffee @@ -68,9 +68,6 @@ module.exports = nativeDescription: "Español (América Latina)", englishDescrip change_hero: "Cambiar héroe" # Go back from choose inventory to choose hero choose_inventory: "Equipar objetos" buy_gems: "Comprar gemas" - campaign_desert: "Campaña del Desierto" - campaign_forest: "Campaña del Bosque" - campaign_dungeon: "Campaña Calabozo" subscription_required: "Requiere Suscripción" free: "Gratis" subscribed: "Suscripto" @@ -317,14 +314,14 @@ module.exports = nativeDescription: "Español (América Latina)", englishDescrip tip_brute_force: "Cuando tengas duda, usa la fuerza bruta. - Ken Thompson" tip_extrapolation: "Solo hay dos tipos de personas: Esas que pueden extrapolar desde información incompleta..." tip_superpower: "Programar es lo más cercano que tenemos a superpoderes." -# tip_control_destiny: "In real open source, you have the right to control your own destiny. - Linus Torvalds" -# tip_no_code: "No code is faster than no code." -# tip_code_never_lies: "Code never lies, comments sometimes do. — Ron Jeffries" -# tip_reusable_software: "Before software can be reusable it first has to be usable." -# tip_optimization_operator: "Every language has an optimization operator. In most languages that operator is ‘//’" -# tip_lines_of_code: "Measuring programming progress by lines of code is like measuring aircraft building progress by weight. — Bill Gates" -# tip_source_code: "I want to change the world but they would not give me the source code." -# tip_javascript_java: "Java is to JavaScript what Car is to Carpet. - Chris Heilmann" + tip_control_destiny: "En el código abierto real, tú tienes el derecho de controlar tu propio destino. - Linus Torvalds" + tip_no_code: "Ningún código es más rápido que nada de código." + tip_code_never_lies: "El código nunca miente, los comentarios a veces sí. — Ron Jeffries" + tip_reusable_software: "Antes de que el software sea reusable, primero tiene que ser usable." + tip_optimization_operator: "Cada lenguaje tiene un operador de optimización. En la mayoría de ellos, ese operador es ‘//’" + tip_lines_of_code: "Medir el progreso en la programación en líneas de código es como medir el progreso de construcción de una aeronave por su peso. — Bill Gates" + tip_source_code: "Quisiera cambiar el mundo, pero no me dan el código fuente." + tip_javascript_java: "Java es a Javascript lo mismo que Comer es a Comercial. - Chris Heilmann" game_menu: inventory_tab: "Inventario" diff --git a/app/locale/es-ES.coffee b/app/locale/es-ES.coffee index 3d0fd1a34..3513ff99f 100644 --- a/app/locale/es-ES.coffee +++ b/app/locale/es-ES.coffee @@ -68,9 +68,6 @@ module.exports = nativeDescription: "español (ES)", englishDescription: "Spanis change_hero: "Seleccionar Heroe" # Go back from choose inventory to choose hero choose_inventory: "Equipar Objetos" buy_gems: "Comprar Joyas" - campaign_desert: "Campaña del Desierto" - campaign_forest: "Campaña del Bosque" - campaign_dungeon: "Campaña del Calabozo" subscription_required: "Suscripción requerida" free: "Gratis" subscribed: "Suscrito" diff --git a/app/locale/fa.coffee b/app/locale/fa.coffee index 13deb176d..2456cf763 100644 --- a/app/locale/fa.coffee +++ b/app/locale/fa.coffee @@ -68,9 +68,6 @@ module.exports = nativeDescription: "فارسی", englishDescription: "Persian", # change_hero: "Change Hero" # Go back from choose inventory to choose hero # choose_inventory: "Equip Items" # buy_gems: "Buy Gems" -# campaign_desert: "Desert Campaign" -# campaign_forest: "Forest Campaign" -# campaign_dungeon: "Dungeon Campaign" # subscription_required: "Subscription Required" # free: "Free" # subscribed: "Subscribed" diff --git a/app/locale/fi.coffee b/app/locale/fi.coffee index 4ad0f16da..c38fc3887 100644 --- a/app/locale/fi.coffee +++ b/app/locale/fi.coffee @@ -68,9 +68,6 @@ module.exports = nativeDescription: "suomi", englishDescription: "Finnish", tran # change_hero: "Change Hero" # Go back from choose inventory to choose hero # choose_inventory: "Equip Items" # buy_gems: "Buy Gems" -# campaign_desert: "Desert Campaign" -# campaign_forest: "Forest Campaign" -# campaign_dungeon: "Dungeon Campaign" # subscription_required: "Subscription Required" # free: "Free" # subscribed: "Subscribed" diff --git a/app/locale/fr.coffee b/app/locale/fr.coffee index 4fe5a942b..91b136e52 100644 --- a/app/locale/fr.coffee +++ b/app/locale/fr.coffee @@ -68,9 +68,6 @@ module.exports = nativeDescription: "français", englishDescription: "French", t change_hero: "Changer le Héro" # Go back from choose inventory to choose hero choose_inventory: "Équiper des objets" buy_gems: "Acheter des gemmes" - campaign_desert: "Campagne Desert" - campaign_forest: "Campagne de la forêt" - campaign_dungeon: "Compagne du donjon" subscription_required: "Enregistrement nécessaire" free: "Gratuit" subscribed: "Enregistré" diff --git a/app/locale/gl.coffee b/app/locale/gl.coffee index 5b581f7fd..12cd9653a 100644 --- a/app/locale/gl.coffee +++ b/app/locale/gl.coffee @@ -68,9 +68,6 @@ module.exports = nativeDescription: "Galego", englishDescription: "Galician", tr change_hero: "Seleccionar Heroe" # Go back from choose inventory to choose hero choose_inventory: "Equipar Obxectos" # buy_gems: "Buy Gems" -# campaign_desert: "Desert Campaign" -# campaign_forest: "Forest Campaign" -# campaign_dungeon: "Dungeon Campaign" # subscription_required: "Subscription Required" # free: "Free" # subscribed: "Subscribed" diff --git a/app/locale/he.coffee b/app/locale/he.coffee index 607e4dfb3..5fd643ce3 100644 --- a/app/locale/he.coffee +++ b/app/locale/he.coffee @@ -68,9 +68,6 @@ module.exports = nativeDescription: "עברית", englishDescription: "Hebrew", # change_hero: "Change Hero" # Go back from choose inventory to choose hero # choose_inventory: "Equip Items" # buy_gems: "Buy Gems" -# campaign_desert: "Desert Campaign" -# campaign_forest: "Forest Campaign" -# campaign_dungeon: "Dungeon Campaign" # subscription_required: "Subscription Required" # free: "Free" # subscribed: "Subscribed" diff --git a/app/locale/hi.coffee b/app/locale/hi.coffee index 1d0866fd4..27383e3d9 100644 --- a/app/locale/hi.coffee +++ b/app/locale/hi.coffee @@ -68,9 +68,6 @@ module.exports = nativeDescription: "मानक हिन्दी", englishDe # change_hero: "Change Hero" # Go back from choose inventory to choose hero # choose_inventory: "Equip Items" # buy_gems: "Buy Gems" -# campaign_desert: "Desert Campaign" -# campaign_forest: "Forest Campaign" -# campaign_dungeon: "Dungeon Campaign" # subscription_required: "Subscription Required" # free: "Free" # subscribed: "Subscribed" diff --git a/app/locale/hu.coffee b/app/locale/hu.coffee index 0b0c3373a..46bc2df35 100644 --- a/app/locale/hu.coffee +++ b/app/locale/hu.coffee @@ -68,9 +68,6 @@ module.exports = nativeDescription: "magyar", englishDescription: "Hungarian", t change_hero: "Hős váltás" # Go back from choose inventory to choose hero choose_inventory: "Felszerelés" buy_gems: "Vásárolj Drágköveket" - campaign_desert: "Sivatagi Kampány" - campaign_forest: "Erdei Kampány" - campaign_dungeon: "Várbörtön Kampány" subscription_required: "Feliratkozást igényel" free: "Ingyenes" subscribed: "Feliratkozva" diff --git a/app/locale/id.coffee b/app/locale/id.coffee index 5b4f0f114..39e20be0d 100644 --- a/app/locale/id.coffee +++ b/app/locale/id.coffee @@ -68,9 +68,6 @@ module.exports = nativeDescription: "Bahasa Indonesia", englishDescription: "Ind # change_hero: "Change Hero" # Go back from choose inventory to choose hero # choose_inventory: "Equip Items" # buy_gems: "Buy Gems" -# campaign_desert: "Desert Campaign" -# campaign_forest: "Forest Campaign" -# campaign_dungeon: "Dungeon Campaign" # subscription_required: "Subscription Required" # free: "Free" # subscribed: "Subscribed" diff --git a/app/locale/it.coffee b/app/locale/it.coffee index cdf8a99da..b0fc62abf 100644 --- a/app/locale/it.coffee +++ b/app/locale/it.coffee @@ -68,9 +68,6 @@ module.exports = nativeDescription: "Italiano", englishDescription: "Italian", t change_hero: "Cambia eroe" # Go back from choose inventory to choose hero choose_inventory: "Dotazioni" buy_gems: "Compra gemme" - campaign_desert: "Campagna nel Deserto" - campaign_forest: "Campagna nella Foresta" - campaign_dungeon: "Campagna nelle Segrete" subscription_required: "E' richiesta l'iscrizione" free: "Gratuito" subscribed: "Per iscritti" diff --git a/app/locale/ja.coffee b/app/locale/ja.coffee index df10c6a30..23861faf6 100644 --- a/app/locale/ja.coffee +++ b/app/locale/ja.coffee @@ -68,9 +68,6 @@ module.exports = nativeDescription: "日本語", englishDescription: "Japanese", # change_hero: "Change Hero" # Go back from choose inventory to choose hero # choose_inventory: "Equip Items" # buy_gems: "Buy Gems" -# campaign_desert: "Desert Campaign" -# campaign_forest: "Forest Campaign" -# campaign_dungeon: "Dungeon Campaign" # subscription_required: "Subscription Required" # free: "Free" # subscribed: "Subscribed" diff --git a/app/locale/ko.coffee b/app/locale/ko.coffee index cee88dd99..7e13d06a8 100644 --- a/app/locale/ko.coffee +++ b/app/locale/ko.coffee @@ -68,9 +68,6 @@ module.exports = nativeDescription: "한국어", englishDescription: "Korean", t # change_hero: "Change Hero" # Go back from choose inventory to choose hero # choose_inventory: "Equip Items" # buy_gems: "Buy Gems" -# campaign_desert: "Desert Campaign" -# campaign_forest: "Forest Campaign" -# campaign_dungeon: "Dungeon Campaign" # subscription_required: "Subscription Required" # free: "Free" # subscribed: "Subscribed" diff --git a/app/locale/lt.coffee b/app/locale/lt.coffee index cc2e1d9ac..0abc9eb5b 100644 --- a/app/locale/lt.coffee +++ b/app/locale/lt.coffee @@ -68,9 +68,6 @@ module.exports = nativeDescription: "lietuvių kalba", englishDescription: "Lith # change_hero: "Change Hero" # Go back from choose inventory to choose hero # choose_inventory: "Equip Items" # buy_gems: "Buy Gems" -# campaign_desert: "Desert Campaign" -# campaign_forest: "Forest Campaign" -# campaign_dungeon: "Dungeon Campaign" # subscription_required: "Subscription Required" # free: "Free" # subscribed: "Subscribed" diff --git a/app/locale/mk-MK.coffee b/app/locale/mk-MK.coffee index 5b9d17521..eaf48c775 100644 --- a/app/locale/mk-MK.coffee +++ b/app/locale/mk-MK.coffee @@ -68,9 +68,6 @@ module.exports = nativeDescription: "Македонски", englishDescription: change_hero: "Смени херој" # Go back from choose inventory to choose hero choose_inventory: "Опреми се" buy_gems: "Купи скапоцени камења" - campaign_desert: "Пустинска кампања" - campaign_forest: "Шумска кампања" - campaign_dungeon: "Занданска кампања" subscription_required: "Потребно е зачленување" free: "Бесплатно" subscribed: "Зачленет" diff --git a/app/locale/ms.coffee b/app/locale/ms.coffee index 76e0a8701..888669b47 100644 --- a/app/locale/ms.coffee +++ b/app/locale/ms.coffee @@ -68,9 +68,6 @@ module.exports = nativeDescription: "Bahasa Melayu", englishDescription: "Bahasa # change_hero: "Change Hero" # Go back from choose inventory to choose hero # choose_inventory: "Equip Items" # buy_gems: "Buy Gems" -# campaign_desert: "Desert Campaign" -# campaign_forest: "Forest Campaign" -# campaign_dungeon: "Dungeon Campaign" # subscription_required: "Subscription Required" # free: "Free" # subscribed: "Subscribed" diff --git a/app/locale/nb.coffee b/app/locale/nb.coffee index d09b52fd5..ba704a750 100644 --- a/app/locale/nb.coffee +++ b/app/locale/nb.coffee @@ -68,9 +68,6 @@ module.exports = nativeDescription: "Norsk Bokmål", englishDescription: "Norweg change_hero: "Bytt Helt" # Go back from choose inventory to choose hero choose_inventory: "Ta i bruk gjenstander" buy_gems: "Kjøp Juveler" -# campaign_desert: "Desert Campaign" - campaign_forest: "Skogsfelttog" - campaign_dungeon: "Katakombefelttog" # subscription_required: "Subscription Required" # free: "Free" # subscribed: "Subscribed" diff --git a/app/locale/nl-BE.coffee b/app/locale/nl-BE.coffee index d36620c99..1ba650f08 100644 --- a/app/locale/nl-BE.coffee +++ b/app/locale/nl-BE.coffee @@ -68,9 +68,6 @@ module.exports = nativeDescription: "Nederlands (België)", englishDescription: change_hero: "Held wisselen" # Go back from choose inventory to choose hero # choose_inventory: "Equip Items" buy_gems: "Koop juwelen" -# campaign_desert: "Desert Campaign" -# campaign_forest: "Forest Campaign" -# campaign_dungeon: "Dungeon Campaign" # subscription_required: "Subscription Required" free: "Vrij" # subscribed: "Subscribed" diff --git a/app/locale/nl-NL.coffee b/app/locale/nl-NL.coffee index a115826e8..01d6da2c3 100644 --- a/app/locale/nl-NL.coffee +++ b/app/locale/nl-NL.coffee @@ -68,9 +68,6 @@ module.exports = nativeDescription: "Nederlands (Nederland)", englishDescription change_hero: "Verander held" # Go back from choose inventory to choose hero # choose_inventory: "Equip Items" buy_gems: "Edelstenen kopen" - campaign_desert: "Woestijncampagne" - campaign_forest: "Boscampagne" - campaign_dungeon: "Kerkercampagne" subscription_required: "Abonnement nodig" free: "Gratis" subscribed: "Geabbonneerd" diff --git a/app/locale/nn.coffee b/app/locale/nn.coffee index c5e738440..ce354f159 100644 --- a/app/locale/nn.coffee +++ b/app/locale/nn.coffee @@ -68,9 +68,6 @@ module.exports = nativeDescription: "Norwegian Nynorsk", englishDescription: "No # change_hero: "Change Hero" # Go back from choose inventory to choose hero # choose_inventory: "Equip Items" # buy_gems: "Buy Gems" -# campaign_desert: "Desert Campaign" -# campaign_forest: "Forest Campaign" -# campaign_dungeon: "Dungeon Campaign" # subscription_required: "Subscription Required" # free: "Free" # subscribed: "Subscribed" diff --git a/app/locale/no.coffee b/app/locale/no.coffee index 05568aeac..c9141a278 100644 --- a/app/locale/no.coffee +++ b/app/locale/no.coffee @@ -68,9 +68,6 @@ module.exports = nativeDescription: "Norsk", englishDescription: "Norwegian", tr # change_hero: "Change Hero" # Go back from choose inventory to choose hero # choose_inventory: "Equip Items" # buy_gems: "Buy Gems" -# campaign_desert: "Desert Campaign" -# campaign_forest: "Forest Campaign" -# campaign_dungeon: "Dungeon Campaign" # subscription_required: "Subscription Required" # free: "Free" # subscribed: "Subscribed" diff --git a/app/locale/pl.coffee b/app/locale/pl.coffee index 51ebbf0a5..85d77a817 100644 --- a/app/locale/pl.coffee +++ b/app/locale/pl.coffee @@ -68,9 +68,6 @@ module.exports = nativeDescription: "język polski", englishDescription: "Polish # change_hero: "Change Hero" # Go back from choose inventory to choose hero # choose_inventory: "Equip Items" # buy_gems: "Buy Gems" -# campaign_desert: "Desert Campaign" -# campaign_forest: "Forest Campaign" -# campaign_dungeon: "Dungeon Campaign" # subscription_required: "Subscription Required" # free: "Free" # subscribed: "Subscribed" diff --git a/app/locale/pt-BR.coffee b/app/locale/pt-BR.coffee index 1813e9619..a0d4c48b8 100644 --- a/app/locale/pt-BR.coffee +++ b/app/locale/pt-BR.coffee @@ -68,9 +68,6 @@ module.exports = nativeDescription: "Português do Brasil", englishDescription: change_hero: "Alterar Herói" # Go back from choose inventory to choose hero choose_inventory: "Equipar Items" buy_gems: "Comprar Gems" - campaign_desert: "Campanha do Deserto" - campaign_forest: "Campanha da Floresta" - campaign_dungeon: "Campanha do Calabouço" subscription_required: "Requer assinatura" free: "Gratuito" subscribed: "Assinante" diff --git a/app/locale/pt-PT.coffee b/app/locale/pt-PT.coffee index 66400af18..d99072f05 100644 --- a/app/locale/pt-PT.coffee +++ b/app/locale/pt-PT.coffee @@ -68,9 +68,6 @@ module.exports = nativeDescription: "Português (Portugal)", englishDescription: change_hero: "Alterar Herói" # Go back from choose inventory to choose hero choose_inventory: "Equipar Itens" buy_gems: "Comprar Gemas" - campaign_desert: "Campanha do Deserto" - campaign_forest: "Campanha da Floresta" - campaign_dungeon: "Campanha da Masmorra" subscription_required: "Subscrição Necessária" free: "Gratuita" subscribed: "Subscrito(a)" diff --git a/app/locale/ro.coffee b/app/locale/ro.coffee index 2d13f066e..82fc40547 100644 --- a/app/locale/ro.coffee +++ b/app/locale/ro.coffee @@ -68,9 +68,6 @@ module.exports = nativeDescription: "limba română", englishDescription: "Roman # change_hero: "Change Hero" # Go back from choose inventory to choose hero # choose_inventory: "Equip Items" # buy_gems: "Buy Gems" -# campaign_desert: "Desert Campaign" -# campaign_forest: "Forest Campaign" -# campaign_dungeon: "Dungeon Campaign" # subscription_required: "Subscription Required" # free: "Free" # subscribed: "Subscribed" diff --git a/app/locale/ru.coffee b/app/locale/ru.coffee index 0e20791d5..fb2fbe4b9 100644 --- a/app/locale/ru.coffee +++ b/app/locale/ru.coffee @@ -68,9 +68,6 @@ module.exports = nativeDescription: "русский", englishDescription: "Russi change_hero: "Выбрать героя" # Go back from choose inventory to choose hero choose_inventory: "Выбрать предметы" buy_gems: "Купить самоцветы" - campaign_desert: "Пустынная кампания" - campaign_forest: "Лесная кампания" - campaign_dungeon: "Кампания в подземелье" subscription_required: "Требуется подписка" free: "Бесплатно" subscribed: "Подписан" diff --git a/app/locale/sk.coffee b/app/locale/sk.coffee index e1d7963f3..36d81e537 100644 --- a/app/locale/sk.coffee +++ b/app/locale/sk.coffee @@ -68,9 +68,6 @@ module.exports = nativeDescription: "slovenčina", englishDescription: "Slovak", # change_hero: "Change Hero" # Go back from choose inventory to choose hero # choose_inventory: "Equip Items" # buy_gems: "Buy Gems" -# campaign_desert: "Desert Campaign" -# campaign_forest: "Forest Campaign" -# campaign_dungeon: "Dungeon Campaign" # subscription_required: "Subscription Required" # free: "Free" # subscribed: "Subscribed" diff --git a/app/locale/sl.coffee b/app/locale/sl.coffee index 3869c1bdd..5d2d5b630 100644 --- a/app/locale/sl.coffee +++ b/app/locale/sl.coffee @@ -68,9 +68,6 @@ module.exports = nativeDescription: "slovenščina", englishDescription: "Sloven # change_hero: "Change Hero" # Go back from choose inventory to choose hero # choose_inventory: "Equip Items" # buy_gems: "Buy Gems" -# campaign_desert: "Desert Campaign" -# campaign_forest: "Forest Campaign" -# campaign_dungeon: "Dungeon Campaign" # subscription_required: "Subscription Required" # free: "Free" # subscribed: "Subscribed" diff --git a/app/locale/sr.coffee b/app/locale/sr.coffee index 92bf819db..968fbe962 100644 --- a/app/locale/sr.coffee +++ b/app/locale/sr.coffee @@ -68,9 +68,6 @@ module.exports = nativeDescription: "српски", englishDescription: "Serbian # change_hero: "Change Hero" # Go back from choose inventory to choose hero # choose_inventory: "Equip Items" # buy_gems: "Buy Gems" -# campaign_desert: "Desert Campaign" -# campaign_forest: "Forest Campaign" -# campaign_dungeon: "Dungeon Campaign" # subscription_required: "Subscription Required" # free: "Free" # subscribed: "Subscribed" diff --git a/app/locale/sv.coffee b/app/locale/sv.coffee index 910aaff45..35003da65 100644 --- a/app/locale/sv.coffee +++ b/app/locale/sv.coffee @@ -68,9 +68,6 @@ module.exports = nativeDescription: "Svenska", englishDescription: "Swedish", tr change_hero: "Byt Hjälte" # Go back from choose inventory to choose hero # choose_inventory: "Equip Items" buy_gems: "Köp ädelstenar" -# campaign_desert: "Desert Campaign" -# campaign_forest: "Forest Campaign" -# campaign_dungeon: "Dungeon Campaign" # subscription_required: "Subscription Required" # free: "Free" # subscribed: "Subscribed" diff --git a/app/locale/th.coffee b/app/locale/th.coffee index 6e69a6733..38c5aaadb 100644 --- a/app/locale/th.coffee +++ b/app/locale/th.coffee @@ -68,9 +68,6 @@ module.exports = nativeDescription: "ไทย", englishDescription: "Thai", tra # change_hero: "Change Hero" # Go back from choose inventory to choose hero # choose_inventory: "Equip Items" # buy_gems: "Buy Gems" -# campaign_desert: "Desert Campaign" -# campaign_forest: "Forest Campaign" -# campaign_dungeon: "Dungeon Campaign" # subscription_required: "Subscription Required" # free: "Free" # subscribed: "Subscribed" diff --git a/app/locale/tr.coffee b/app/locale/tr.coffee index dc31d6b2f..0e48102ee 100644 --- a/app/locale/tr.coffee +++ b/app/locale/tr.coffee @@ -68,9 +68,6 @@ module.exports = nativeDescription: "Türkçe", englishDescription: "Turkish", t change_hero: "Kahramanı Değiştir" # Go back from choose inventory to choose hero choose_inventory: "Ögeleri Giy" buy_gems: "Taş satın a" -# campaign_desert: "Desert Campaign" - campaign_forest: "Orman Senaryosu" - campaign_dungeon: "Zindan Senaryosu" # subscription_required: "Subscription Required" # free: "Free" # subscribed: "Subscribed" diff --git a/app/locale/uk.coffee b/app/locale/uk.coffee index a88cd4e4d..a14f65345 100644 --- a/app/locale/uk.coffee +++ b/app/locale/uk.coffee @@ -68,9 +68,6 @@ module.exports = nativeDescription: "Українська", englishDescription: change_hero: "Змінити героя" # Go back from choose inventory to choose hero choose_inventory: "Одягнути предмети" buy_gems: "Придбати самоцвіти" - campaign_desert: "Пустельна кампанія" - campaign_forest: "Лісова кампанія" - campaign_dungeon: "Кампанія підземелля" subscription_required: "Потрібен абонемет" free: "Безкоштовно" subscribed: "абонемент є" diff --git a/app/locale/ur.coffee b/app/locale/ur.coffee index 227711849..6ed4fa96a 100644 --- a/app/locale/ur.coffee +++ b/app/locale/ur.coffee @@ -68,9 +68,6 @@ module.exports = nativeDescription: "اُردُو", englishDescription: "Urdu", # change_hero: "Change Hero" # Go back from choose inventory to choose hero # choose_inventory: "Equip Items" # buy_gems: "Buy Gems" -# campaign_desert: "Desert Campaign" -# campaign_forest: "Forest Campaign" -# campaign_dungeon: "Dungeon Campaign" # subscription_required: "Subscription Required" # free: "Free" # subscribed: "Subscribed" diff --git a/app/locale/vi.coffee b/app/locale/vi.coffee index f30db598b..109397913 100644 --- a/app/locale/vi.coffee +++ b/app/locale/vi.coffee @@ -68,9 +68,6 @@ module.exports = nativeDescription: "Tiếng Việt", englishDescription: "Vietn # change_hero: "Change Hero" # Go back from choose inventory to choose hero # choose_inventory: "Equip Items" buy_gems: "Mua ngọc" -# campaign_desert: "Desert Campaign" - campaign_forest: "Chơi Rừng" -# campaign_dungeon: "Dungeon Campaign" # subscription_required: "Subscription Required" # free: "Free" # subscribed: "Subscribed" diff --git a/app/locale/zh-HANS.coffee b/app/locale/zh-HANS.coffee index 1cc44e510..192c04301 100644 --- a/app/locale/zh-HANS.coffee +++ b/app/locale/zh-HANS.coffee @@ -68,9 +68,6 @@ module.exports = nativeDescription: "简体中文", englishDescription: "Chinese change_hero: "重新选择英雄" # Go back from choose inventory to choose hero choose_inventory: "装备道具" buy_gems: "购买宝石" - campaign_desert: "沙漠战役" - campaign_forest: "森林战役" - campaign_dungeon: "地牢战役" subscription_required: "需订阅" free: "免费" subscribed: "已订阅" @@ -317,14 +314,14 @@ module.exports = nativeDescription: "简体中文", englishDescription: "Chinese tip_brute_force: "拿不准时就用穷举法。 - Ken Thompson" tip_extrapolation: "世界上只有两类人:一类人能够根据不完整的数据进行推断……" tip_superpower: "编程是我们拥有的最接近超能力的技能" -# tip_control_destiny: "In real open source, you have the right to control your own destiny. - Linus Torvalds" -# tip_no_code: "No code is faster than no code." -# tip_code_never_lies: "Code never lies, comments sometimes do. — Ron Jeffries" -# tip_reusable_software: "Before software can be reusable it first has to be usable." -# tip_optimization_operator: "Every language has an optimization operator. In most languages that operator is ‘//’" -# tip_lines_of_code: "Measuring programming progress by lines of code is like measuring aircraft building progress by weight. — Bill Gates" -# tip_source_code: "I want to change the world but they would not give me the source code." -# tip_javascript_java: "Java is to JavaScript what Car is to Carpet. - Chris Heilmann" + tip_control_destiny: "拥有控制自己命运的权利才是真正的开源。 - Linus Torvalds" + tip_no_code: "没有什么比不写代码来的更快。" + tip_code_never_lies: "代码从来不会说谎,但是注释有时候会. — Ron Jeffries" + tip_reusable_software: "软件能够重用的前提是,这货必须能用。" + tip_optimization_operator: "每个编程语言都有注释符号,大多数语言采用的是‘//’" + tip_lines_of_code: "以代码行数为标准管理程序开发的进度跟用重量为标准管理飞船建造的进度一样愚蠢. — Bill Gates" + tip_source_code: "我想改变世界,但是他们不给我源代码。" + tip_javascript_java: "Java和JavaScript的关系就好比是马和马云. - Chris Heilmann" game_menu: inventory_tab: "道具箱" @@ -371,13 +368,13 @@ module.exports = nativeDescription: "简体中文", englishDescription: "Chinese subscribe: subscribe_title: "订阅" unsubscribe: "取消订阅" -# confirm_unsubscribe: "Confirm Unsubscribe" -# never_mind: "Never Mind, I Still Love You" -# thank_you_months_prefix: "Thank you for supporting us these last" -# thank_you_months_suffix: "months." -# thank_you: "Thank you for supporting CodeCombat." -# sorry_to_see_you_go: "Sorry to see you go! Please let us know what we could have done better." -# unsubscribe_feedback_placeholder: "O, what have we done?" + confirm_unsubscribe: "确认取消订阅" + never_mind: "没关系,我们依然喜欢你" + thank_you_months_prefix: "感谢您这" + thank_you_months_suffix: "个月以来对我们的支持." + thank_you: "感谢您支持CodeCombat." + sorry_to_see_you_go: "真舍不得亲离开啊! 请一定要让我们知道哪里做的还不够好。" + unsubscribe_feedback_placeholder: "O, 我们做了神马?" levels: "多解锁17个关卡!每周解锁5个新关卡!" heroes: "更多强大的英雄!" gems: "每月多3500宝石奖励!" @@ -408,7 +405,7 @@ module.exports = nativeDescription: "简体中文", englishDescription: "Chinese weapons_warrior: "刀剑 - 近程物理攻击" weapons_ranger: "弓弩,火枪 - 远程物理攻击" weapons_wizard: "魔棒,法杖 - 远程魔法攻击" - attack: "伤害" # Can also translate as "Attack" + attack: "攻击" # Can also translate as "Attack" health: "健康值" speed: "速度" regeneration: "恢复" diff --git a/app/locale/zh-HANT.coffee b/app/locale/zh-HANT.coffee index 579af99f4..d9b0f2952 100644 --- a/app/locale/zh-HANT.coffee +++ b/app/locale/zh-HANT.coffee @@ -68,9 +68,6 @@ module.exports = nativeDescription: "繁体中文", englishDescription: "Chinese change_hero: "更換英雄" # Go back from choose inventory to choose hero choose_inventory: "裝備物品" buy_gems: "購買鑽石" - campaign_desert: "沙漠戰役" - campaign_forest: "森林戰役" - campaign_dungeon: "地牢戰役" subscription_required: "需要訂購" free: "免費" subscribed: "已訂購" diff --git a/app/locale/zh-WUU-HANS.coffee b/app/locale/zh-WUU-HANS.coffee index 24fd6f414..f9ff3f484 100644 --- a/app/locale/zh-WUU-HANS.coffee +++ b/app/locale/zh-WUU-HANS.coffee @@ -68,9 +68,6 @@ module.exports = nativeDescription: "吴语", englishDescription: "Wuu (Simplifi # change_hero: "Change Hero" # Go back from choose inventory to choose hero # choose_inventory: "Equip Items" # buy_gems: "Buy Gems" -# campaign_desert: "Desert Campaign" -# campaign_forest: "Forest Campaign" -# campaign_dungeon: "Dungeon Campaign" # subscription_required: "Subscription Required" # free: "Free" # subscribed: "Subscribed" diff --git a/app/locale/zh-WUU-HANT.coffee b/app/locale/zh-WUU-HANT.coffee index 5610c092c..034869b02 100644 --- a/app/locale/zh-WUU-HANT.coffee +++ b/app/locale/zh-WUU-HANT.coffee @@ -68,9 +68,6 @@ module.exports = nativeDescription: "吳語", englishDescription: "Wuu (Traditio # change_hero: "Change Hero" # Go back from choose inventory to choose hero # choose_inventory: "Equip Items" # buy_gems: "Buy Gems" -# campaign_desert: "Desert Campaign" -# campaign_forest: "Forest Campaign" -# campaign_dungeon: "Dungeon Campaign" # subscription_required: "Subscription Required" # free: "Free" # subscribed: "Subscribed" diff --git a/app/models/Campaign.coffee b/app/models/Campaign.coffee index fec933a31..54c53b33b 100644 --- a/app/models/Campaign.coffee +++ b/app/models/Campaign.coffee @@ -7,4 +7,4 @@ module.exports = class Campaign extends CocoModel urlRoot: '/db/campaign' saveBackups: true @denormalizedLevelProperties: _.keys(_.omit(schema.properties.levels.additionalProperties.properties, ['unlocks', 'position', 'rewards'])) - @denormalizedCampaignProperties: ['name', 'i18n', 'description', 'slug'] + @denormalizedCampaignProperties: ['name', 'i18n', 'slug'] diff --git a/app/schemas/models/campaign.schema.coffee b/app/schemas/models/campaign.schema.coffee index a08df6a3e..34225115a 100644 --- a/app/schemas/models/campaign.schema.coffee +++ b/app/schemas/models/campaign.schema.coffee @@ -4,7 +4,8 @@ CampaignSchema = c.object() c.extendNamedProperties CampaignSchema # name first _.extend CampaignSchema.properties, { - i18n: {type: 'object', title: 'i18n', format: 'i18n', props: ['name', 'body']} + i18n: {type: 'object', title: 'i18n', format: 'i18n', props: ['name', 'fullName']} + fullName: { type: 'string', title: 'Full Name', description: 'Ex.: "Kithgard Dungeon"' } ambientSound: c.object {}, mp3: { type: 'string', format: 'sound-file' } diff --git a/app/styles/play/campaign-view.sass b/app/styles/play/campaign-view.sass index ee153c908..ad1158ea5 100644 --- a/app/styles/play/campaign-view.sass +++ b/app/styles/play/campaign-view.sass @@ -404,13 +404,26 @@ $gameControlMargin: 30px #campaign-status position: absolute left: 0 - top: 15px + top: 5px width: 100% margin: 0 text-align: center color: rgb(254,188,68) font-size: 30px text-shadow: black 2px 2px 0, black -2px -2px 0, black 2px -2px 0, black -2px 2px 0, black 2px 0px 0, black 0px -2px 0, black -2px 0px 0, black 0px 2px 0 + z-index: 30 + pointer-events: none + + .campaign-status-background + background-color: rgba(255, 255, 255, 0.5) + border-radius: 10px + padding: 10px + display: inline-block + + img.banner + height: 50px + vertical-align: bottom + margin: -20px 0 -6px 5px body:not(.ipad) #campaign-view diff --git a/app/templates/play/campaign-view.jade b/app/templates/play/campaign-view.jade index 7d4bc3423..36568e89c 100644 --- a/app/templates/play/campaign-view.jade +++ b/app/templates/play/campaign-view.jade @@ -80,15 +80,15 @@ button.btn.btn-lg.btn-inverse#volume-button(data-i18n="[title]play.adjust_volume .glyphicon.glyphicon-volume-down .glyphicon.glyphicon-volume-up -//h1#campaign-status -// if mapType == 'dungeon' -// span.spr(data-i18n="play.campaign_dungeon") -// else if mapType == 'forest' -// span.spr(data-i18n="play.campaign_forest") -// | - -// if requiresSubscription -// span.spl(data-i18n="play.subscription_required") -// else if mapType == 'dungeon' -// span.spl(data-i18n="play.free") -// else -// span.spl(data-i18n="play.subscribed") +if campaign.loaded + h1#campaign-status + .campaign-status-background + - var fullName = i18n(campaign.attributes, 'fullName') + if me.get('preferredLanguage', true).split('-')[0] == 'en' || fullName != campaign.get('fullName') + // We have a translation. + span.spr= fullName + | - + span.spl.spr= levelsCompleted + | / + span.spl= levelsTotal + img.banner(src="/images/pages/play/level-banner-complete.png") diff --git a/app/views/editor/campaign/CampaignEditorView.coffee b/app/views/editor/campaign/CampaignEditorView.coffee index a32e9d818..a4b94bef7 100644 --- a/app/views/editor/campaign/CampaignEditorView.coffee +++ b/app/views/editor/campaign/CampaignEditorView.coffee @@ -334,6 +334,7 @@ class CampaignNode extends TreemaObjectNode populateData: -> return if @data.name? + # TODO: Need to be able to update i18n links to other campaigns data = _.pick CampaignsNode.campaigns[@keyForParent].attributes, Campaign.denormalizedCampaignProperties _.extend @data, data diff --git a/app/views/i18n/I18NEditAchievementView.coffee b/app/views/i18n/I18NEditAchievementView.coffee index bddfbc3f2..be7386c3d 100644 --- a/app/views/i18n/I18NEditAchievementView.coffee +++ b/app/views/i18n/I18NEditAchievementView.coffee @@ -2,7 +2,7 @@ I18NEditModelView = require './I18NEditModelView' Achievement = require 'models/Achievement' module.exports = class I18NEditAchievementView extends I18NEditModelView - id: "i18n-edit-component-view" + id: "i18n-edit-achievement-view" modelClass: Achievement buildTranslationList: -> diff --git a/app/views/i18n/I18NEditCampaignView.coffee b/app/views/i18n/I18NEditCampaignView.coffee new file mode 100644 index 000000000..21e2115e0 --- /dev/null +++ b/app/views/i18n/I18NEditCampaignView.coffee @@ -0,0 +1,18 @@ +I18NEditModelView = require './I18NEditModelView' +Campaign = require 'models/Campaign' + +module.exports = class I18NEditCampaignView extends I18NEditModelView + id: "i18n-edit-campaign-view" + modelClass: Campaign + + buildTranslationList: -> + lang = @selectedLanguage + + # name, description + if i18n = @model.get('i18n') + if name = @model.get('name') + @wrapRow 'Campaign short name', ['name'], name, i18n[lang]?.name, [] + if description = @model.get('fullName') + @wrapRow 'Campaign full name', ['fullName'], description, i18n[lang]?.description, [] + + # TODO: saves to this don't work since Campaigns don't use versioning. What to do? diff --git a/app/views/i18n/I18NEditComponentView.coffee b/app/views/i18n/I18NEditComponentView.coffee index 42fb3ac35..360ff2a1c 100644 --- a/app/views/i18n/I18NEditComponentView.coffee +++ b/app/views/i18n/I18NEditComponentView.coffee @@ -2,7 +2,7 @@ I18NEditModelView = require './I18NEditModelView' LevelComponent = require 'models/LevelComponent' module.exports = class I18NEditComponentView extends I18NEditModelView - id: "i18n-edit-component-view" + id: 'i18n-edit-component-view' modelClass: LevelComponent buildTranslationList: -> @@ -14,7 +14,7 @@ module.exports = class I18NEditComponentView extends I18NEditModelView #- Component property descriptions if i18n = propDoc.i18n - path = ["propertyDocumentation", propDocIndex] + path = ['propertyDocumentation', propDocIndex] if _.isObject propDoc.description for progLang, description of propDoc.description @wrapRow "#{propDoc.name} description (#{progLang})", ['description', progLang], description, i18n[lang]?[progLang]?.description, path, 'markdown' @@ -22,11 +22,11 @@ module.exports = class I18NEditComponentView extends I18NEditModelView @wrapRow "#{propDoc.name} description", ['description'], propDoc.description, i18n[lang]?.description, path, 'markdown' if context = propDoc.context for key, value of context - @wrapRow "#{propDoc.name} context value", ["context", key], value, i18n[lang]?.context[key], path + @wrapRow "#{propDoc.name} context value", ['context', key], value, i18n[lang]?.context[key], path #- Component return value descriptions if i18n = propDoc.returns?.i18n - path = ["propertyDocumentation", propDocIndex, "returns"] + path = ['propertyDocumentation', propDocIndex, 'returns'] d = propDoc.returns.description if _.isObject d for progLang, description of d.description @@ -38,7 +38,7 @@ module.exports = class I18NEditComponentView extends I18NEditModelView if propDoc.args for argDoc, argIndex in propDoc.args if i18n = argDoc.i18n - path = ["propertyDocumentation", propDocIndex, 'args', argIndex] + path = ['propertyDocumentation', propDocIndex, 'args', argIndex] if _.isObject argDoc.description for progLang, description of argDoc.description @wrapRow "#{propDoc.name} arg description #{argDoc.name} (#{progLang})", ['description', progLang], description, i18n[lang]?[progLang]?.description, path, 'markdown' diff --git a/app/views/i18n/I18NEditLevelView.coffee b/app/views/i18n/I18NEditLevelView.coffee index 307c7413b..8a9ed0029 100644 --- a/app/views/i18n/I18NEditLevelView.coffee +++ b/app/views/i18n/I18NEditLevelView.coffee @@ -3,7 +3,7 @@ Level = require 'models/Level' LevelComponent = require 'models/LevelComponent' module.exports = class I18NEditLevelView extends I18NEditModelView - id: "i18n-edit-level-view" + id: 'i18n-edit-level-view' modelClass: Level buildTranslationList: -> @@ -12,21 +12,21 @@ module.exports = class I18NEditLevelView extends I18NEditModelView # name, description if i18n = @model.get('i18n') if name = @model.get('name') - @wrapRow "Level name", ['name'], name, i18n[lang]?.name, [] + @wrapRow 'Level name', ['name'], name, i18n[lang]?.name, [] if description = @model.get('description') - @wrapRow "Level description", ['description'], description, i18n[lang]?.description, [] + @wrapRow 'Level description', ['description'], description, i18n[lang]?.description, [] if loadingTip = @model.get('loadingTip') - @wrapRow "Loading tip", ['loadingTip'], loadingTip, i18n[lang]?.loadingTip, [] + @wrapRow 'Loading tip', ['loadingTip'], loadingTip, i18n[lang]?.loadingTip, [] # goals for goal, index in @model.get('goals') ? [] if i18n = goal.i18n - @wrapRow "Goal name", ['name'], goal.name, i18n[lang]?.name, ['goals', index] + @wrapRow 'Goal name', ['name'], goal.name, i18n[lang]?.name, ['goals', index] # documentation for doc, index in @model.get('documentation')?.specificArticles ? [] if i18n = doc.i18n - @wrapRow "Guide article name", ['name'], doc.name, i18n[lang]?.name, ['documentation', 'specificArticles', index] + @wrapRow 'Guide article name', ['name'], doc.name, i18n[lang]?.name, ['documentation', 'specificArticles', index] @wrapRow "'#{doc.name}' description", ['description'], doc.description, i18n[lang]?.description, ['documentation', 'specificArticles', index], 'markdown' # sprite dialogues @@ -37,17 +37,17 @@ module.exports = class I18NEditLevelView extends I18NEditModelView if i18n = spriteCommand.say?.i18n if spriteCommand.say.text - @wrapRow "Sprite text", ['text'], spriteCommand.say.text, i18n[lang]?.text, pathPrefix, 'markdown' + @wrapRow 'Sprite text', ['text'], spriteCommand.say.text, i18n[lang]?.text, pathPrefix, 'markdown' if spriteCommand.say.blurb - @wrapRow "Sprite blurb", ['blurb'], spriteCommand.say.blurb, i18n[lang]?.blurb, pathPrefix + @wrapRow 'Sprite blurb', ['blurb'], spriteCommand.say.blurb, i18n[lang]?.blurb, pathPrefix for response, responseIndex in spriteCommand.say?.responses ? [] if i18n = response.i18n - @wrapRow "Response button", ['text'], response.text, i18n[lang]?.text, pathPrefix.concat(['responses', responseIndex]) + @wrapRow 'Response button', ['text'], response.text, i18n[lang]?.text, pathPrefix.concat(['responses', responseIndex]) # victory modal if i18n = @model.get('victory')?.i18n - @wrapRow "Victory text", ['body'], @model.get('victory').body, i18n[lang]?.body, ['victory'], 'markdown' + @wrapRow 'Victory text', ['body'], @model.get('victory').body, i18n[lang]?.body, ['victory'], 'markdown' # code comments for thang, thangIndex in @model.get('thangs') ? [] @@ -57,4 +57,4 @@ module.exports = class I18NEditLevelView extends I18NEditModelView if (i18n = method.i18n) and (context = method.context) for key, value of context path = ['thangs', thangIndex, 'components', componentIndex, 'config', 'programmableMethods', methodName] - @wrapRow "Code comment", ["context", key], value, i18n[lang]?.context[key], path + @wrapRow 'Code comment', ['context', key], value, i18n[lang]?.context[key], path diff --git a/app/views/i18n/I18NEditThangTypeView.coffee b/app/views/i18n/I18NEditThangTypeView.coffee index 1c3c07012..5b85029bf 100644 --- a/app/views/i18n/I18NEditThangTypeView.coffee +++ b/app/views/i18n/I18NEditThangTypeView.coffee @@ -2,7 +2,7 @@ I18NEditModelView = require './I18NEditModelView' ThangType = require 'models/ThangType' module.exports = class ThangTypeI18NView extends I18NEditModelView - id: "thang-type-i18n-view" + id: 'thang-type-i18n-view' modelClass: ThangType buildTranslationList: -> diff --git a/app/views/i18n/I18NHomeView.coffee b/app/views/i18n/I18NHomeView.coffee index b43e6f44e..551637ebb 100644 --- a/app/views/i18n/I18NHomeView.coffee +++ b/app/views/i18n/I18NHomeView.coffee @@ -6,12 +6,13 @@ LevelComponent = require 'models/LevelComponent' ThangType = require 'models/ThangType' Level = require 'models/Level' Achievement = require 'models/Achievement' +Campaign = require 'models/Campaign' languages = _.keys(require 'locale/locale').sort() PAGE_SIZE = 100 module.exports = class I18NHomeView extends RootView - id: "i18n-home-view" + id: 'i18n-home-view' template: template events: @@ -27,15 +28,16 @@ module.exports = class I18NHomeView extends RootView return 2 if m.specificallyCovered return 1 if m.generallyCovered return 0 - + project = ['name', 'components.original', 'i18nCoverage', 'slug'] @thangTypes = new CocoCollection([], { url: '/db/thang.type?view=i18n-coverage', project: project, model: ThangType }) @components = new CocoCollection([], { url: '/db/level.component?view=i18n-coverage', project: project, model: LevelComponent }) @levels = new CocoCollection([], { url: '/db/level?view=i18n-coverage', project: project, model: Level }) @achievements = new CocoCollection([], { url: '/db/achievement?view=i18n-coverage', project: project, model: Achievement }) + @campaigns = new CocoCollection([], { url: '/db/campaign?view=i18n-coverage', project: project, model: Campaign }) - for c in [@thangTypes, @components, @levels, @achievements] + for c in [@thangTypes, @components, @levels, @achievements, @campaigns] c.skip = 0 c.fetch({data: {skip: 0, limit: PAGE_SIZE}, cache:false}) @supermodel.loadCollection(c, 'documents') @@ -45,10 +47,11 @@ module.exports = class I18NHomeView extends RootView onCollectionSynced: (collection) -> for model in collection.models model.i18nURLBase = switch model.constructor.className - when "ThangType" then "/i18n/thang/" - when "LevelComponent" then "/i18n/component/" - when "Achievement" then "/i18n/achievement/" - when "Level" then "/i18n/level/" + when 'ThangType' then '/i18n/thang/' + when 'LevelComponent' then '/i18n/component/' + when 'Achievement' then '/i18n/achievement/' + when 'Level' then '/i18n/level/' + when 'Campaign' then '/i18n/campaign/' getMore = collection.models.length is PAGE_SIZE @aggregateModels.add(collection.models) @render() @@ -63,11 +66,11 @@ module.exports = class I18NHomeView extends RootView c.languages = languages c.selectedLanguage = @selectedLanguage c.collection = @aggregateModels - + covered = (m for m in @aggregateModels.models when m.specificallyCovered).length total = @aggregateModels.models.length c.progress = if total then parseInt(100 * covered / total) else 100 - + c updateCoverage: -> @@ -77,7 +80,7 @@ module.exports = class I18NHomeView extends RootView @updateCoverageForModel(model, relatedLanguages) model.generallyCovered = true if _.string.startsWith @selectedLanguage, 'en' @aggregateModels.sort() - + updateCoverageForModel: (model, relatedLanguages) -> model.specificallyCovered = true model.generallyCovered = true diff --git a/app/views/play/CampaignView.coffee b/app/views/play/CampaignView.coffee index 619e12799..12137f5a9 100644 --- a/app/views/play/CampaignView.coffee +++ b/app/views/play/CampaignView.coffee @@ -133,6 +133,7 @@ module.exports = class CampaignView extends RootView context = super(context) context.campaign = @campaign context.levels = _.values($.extend true, {}, @campaign.get('levels')) + context.levelsCompleted = context.levelsTotal = 0 for level in context.levels level.position ?= { x: 10, y: 10 } level.locked = not me.ownsLevel level.original @@ -146,6 +147,9 @@ module.exports = class CampaignView extends RootView if level.unlocksHero level.unlockedHero = level.unlocksHero.originalID in (me.get('earned')?.heroes or []) level.hidden = level.locked + unless level.disabled + ++context.levelsTotal + ++context.levelsCompleted if @levelStatusMap[level.slug] is 'complete' @determineNextLevel context.levels if @sessions.loaded # put lower levels in last, so in the world map they layer over one another properly. @@ -161,7 +165,6 @@ module.exports = class CampaignView extends RootView context.adjacentCampaigns = _.filter _.values(_.cloneDeep(@campaign.get('adjacentCampaigns') or {})), (ac) => return false if ac.showIfUnlocked and (ac.showIfUnlocked not in me.levels()) and not @editorMode ac.name = utils.i18n ac, 'name' - ac.description = utils.i18n ac, 'description' styles = [] styles.push "color: #{ac.color}" if ac.color styles.push "transform: rotate(#{ac.rotation}deg)" if ac.rotation diff --git a/scripts/analytics/mongodb/queries/LevelPlayedBeforeSub.js b/scripts/analytics/mongodb/queries/LevelPlayedBeforeSub.js index fa7ac0df7..ad269b03f 100644 --- a/scripts/analytics/mongodb/queries/LevelPlayedBeforeSub.js +++ b/scripts/analytics/mongodb/queries/LevelPlayedBeforeSub.js @@ -5,64 +5,70 @@ // Usage restricted to HoC Dates: // mongo
:/ -eval "var startDate='2014-12-08T00:00:00.000Z', endDate='2014-12-14T00:00:00.000Z';"