3
3
//Start by defining the main module and adding the module dependencies
4
4
angular . module ( ApplicationConfiguration . applicationModuleName , ApplicationConfiguration . applicationModuleVendorDependencies ) ;
5
5
6
- // Extend $santize to accomidate for ui-sref
7
- // NEEDED: this has to be in the angular-translate module
8
- // https://github.com/angular/angular.js/pull/6252/files
6
+ angular . module ( ApplicationConfiguration . applicationModuleName ) . factory (
7
+ 'customLoader' , function ( $q , $http ) {
8
+ return function ( opts ) {
9
+ var deferred = $q . deferred ;
9
10
10
- /*var $sanitizeExtFactory = function() {
11
- return {
11
+ $http . get ( '/languages/locale-es_US.json' )
12
+ . then ( function ( data ) {
13
+ deferred . resolve ( data ) ;
14
+ } , function ( err ) {
15
+ deferred . reject ( err ) ;
16
+ } ) ;
12
17
13
- addSafeElements: function(elements) {
14
- var map = makeMap(elements);
15
- angular.extend(blockElements, map);
16
- angular.extend(validElements, map);
17
- },
18
-
19
- addSafeAttributes: function(attrs) {
20
- angular.extend(validAttrs, makeMap(attrs));
21
- }
22
- };
23
- };*/
18
+ return deferred . promise ;
19
+ }
20
+ }
21
+ ) ;
24
22
25
23
angular . module ( ApplicationConfiguration . applicationModuleName )
26
24
// Setting HTML5 Location Mode
@@ -47,6 +45,170 @@ angular.module(ApplicationConfiguration.applicationModuleName)
47
45
// enable logging for missing IDs
48
46
$translateProvider . useMissingTranslationHandlerLog ( ) ;
49
47
48
+ $translateProvider . translations ( 'special' , {
49
+ "checklist" : {
50
+ "bedrooms" : {
51
+ "title" : "Bedrooms" ,
52
+ "paint" : "Peeling Paint" ,
53
+ "cracked" : "Cracked Walls" ,
54
+ "mold" : "Mold on Walls" ,
55
+ "water" : "Water Damage" ,
56
+ "loose" : "Loose Floor" ,
57
+ "windowGlass" : "Window Glass Broken" ,
58
+ "windowFrame" : "Window Frame Defective" ,
59
+ "door" : "Door Broken" ,
60
+ "radiators" : "Radiators/Risers Defective" ,
61
+ "ceilingFall" : "Ceiling Falling/Fell" ,
62
+ "ceilingLeaking" : "Ceiling Leaking" ,
63
+ "electricity" : "Electricity defective" ,
64
+ "electricExposed" : "Electric wiring exposed" ,
65
+ "outlets" : "Outlets defective"
66
+ } ,
67
+ "kitchen" :{
68
+ "title" : "Kitchen" ,
69
+ "paint" : "@:checklist.bedrooms.paint" ,
70
+ "cracked" : "@:checklist.bedrooms.cracked" ,
71
+ "mold" : "@:checklist.bedrooms.mold" ,
72
+ "water" : "@:checklist.bedrooms.water" ,
73
+ "loose" : "@:checklist.bedrooms.loose" ,
74
+ "baseboards" : "Baseboards Defective" ,
75
+ "windowGlass" : "@:checklist.bedrooms.windowGlass" ,
76
+ "windowFrame" : "@:checklist.bedrooms.windowFrame" ,
77
+ "door" : "@:checklist.bedrooms.door" ,
78
+ "radiators" : "@:checklist.bedrooms.radiators" ,
79
+ "ceilingFall" : "@:checklist.bedrooms.ceilingFall" ,
80
+ "ceilingLeaking" : "@:checklist.bedrooms.ceilingLeaking" ,
81
+ "electricity" : "@:checklist.bedrooms.electricity" ,
82
+ "electricExposed" : "@:checklist.bedrooms.electricExposed" ,
83
+ "outlets" : "@:checklist.bedrooms.outlets" ,
84
+ "sink" : "Cracked Sink (Sink)" ,
85
+ "leakyFaucet" : "Leaky Faucet (Sink)" ,
86
+ "noFaucet" : "Faucets not installed (Sink)" ,
87
+ "brokenFaucet" : "Faucets not working (Sink)" ,
88
+ "pipesLeaking" : "Pipes Leaking (Sink)" ,
89
+ "drainBlock" : "Drain Stoppage (Sink)" ,
90
+ "fridgeDefective" : "Refrigerator Defective" ,
91
+ "fridgeBroken" : "Refrigerator Broken" ,
92
+ "stoveDefective" : "Stove Defective" ,
93
+ "stoveBroken" : "Stove Broken"
94
+ } ,
95
+ "livingRoom" : {
96
+ "title" : "Living Room" ,
97
+ "paint" : "@:checklist.bedrooms.paint" ,
98
+ "cracked" : "@:checklist.bedrooms.cracked" ,
99
+ "mold" : "@:checklist.bedrooms.mold" ,
100
+ "water" : "@:checklist.bedrooms.water" ,
101
+ "loose" : "@:checklist.bedrooms.loose" ,
102
+ "baseboards" : "Baseboards Defective" ,
103
+ "windowGlass" : "@:checklist.bedrooms.windowGlass" ,
104
+ "windowFrame" : "@:checklist.bedrooms.windowFrame" ,
105
+ "door" : "@:checklist.bedrooms.door" ,
106
+ "radiators" : "@:checklist.bedrooms.radiators" ,
107
+ "ceilingFall" : "@:checklist.bedrooms.ceilingFall" ,
108
+ "ceilingLeaking" : "@:checklist.bedrooms.ceilingLeaking" ,
109
+ "electricity" : "@:checklist.bedrooms.electricity" ,
110
+ "electricExposed" : "@:checklist.bedrooms.electricExposed" ,
111
+ "outlets" : "@:checklist.bedrooms.outlets"
112
+ } ,
113
+ "bathroom" : {
114
+ "title" : "Bathroom" ,
115
+ "paint" : "@:checklist.bedrooms.paint" ,
116
+ "cracked" : "@:checklist.bedrooms.cracked" ,
117
+ "mold" : "@:checklist.bedrooms.mold" ,
118
+ "water" : "@:checklist.bedrooms.water" ,
119
+ "loose" : "@:checklist.bedrooms.loose" ,
120
+ "baseboards" : "Baseboards Defective" ,
121
+ "windowGlass" : "@:checklist.bedrooms.windowGlass" ,
122
+ "windowFrame" : "@:checklist.bedrooms.windowFrame" ,
123
+ "door" : "@:checklist.bedrooms.door" ,
124
+ "radiators" : "@:checklist.bedrooms.radiators" ,
125
+ "ceilingFall" : "@:checklist.bedrooms.ceilingFall" ,
126
+ "ceilingLeaking" : "@:checklist.bedrooms.ceilingLeaking" ,
127
+ "electricity" : "@:checklist.bedrooms.electricity" ,
128
+ "electricExposed" : "@:checklist.bedrooms.electricExposed" ,
129
+ "outlets" : "@:checklist.bedrooms.outlets" ,
130
+ "toiletBroken" : "Toilet not working (Toilet)" ,
131
+ "toiletLeaking" : "Toilet leaking (Toilet)" ,
132
+ "waterPressureToilet" : "Inadequate Water pressure (Toilet)" ,
133
+ "sink" : "Cracked Sink (Sink)" ,
134
+ "leakyFaucet" : "Leaky Faucet (Sink)" ,
135
+ "noFaucet" : "Faucets not installed (Sink)" ,
136
+ "brokenFaucet" : "Faucets not working (Sink)" ,
137
+ "pipesLeaking" : "Pipes Leaking (Sink)" ,
138
+ "crackedTub" : "Cracked Tub (Bathtub)" ,
139
+ "leakyFaucetB" : "Leaky Faucet (Bathtub)" ,
140
+ "noFaucetB" : "Faucets not installed (Bathtub)" ,
141
+ "faucetsNotWorkingB" : "Faucets not working (Bathtub)" ,
142
+ "pipesLeakingB" : "Pipes Leaking (Bathtub)" ,
143
+ "notWorkingShower" : "Not working (Shower)" ,
144
+ "WaterPressureShower" : "Inadequate Water pressure (Shower)" ,
145
+ "leakyShowerHead" : "Leaky shower head (Shower)" ,
146
+ "wallTiles" : "Wall tiles cracked (Shower)" ,
147
+ "wallTilesMissing" : "Wall tiles missing (Shower)" ,
148
+ "drainStoppage" : "Drain Stoppage (Shower)"
149
+ } ,
150
+ "entireHome" : {
151
+ "title" : "Entire Home" ,
152
+ "mice" : "Mice" ,
153
+ "rats" : "Rats" ,
154
+ "cockroaches" : "Cockroaches" ,
155
+ "hotWater" : "No Hot water" ,
156
+ "coldWater" : "No Cold water" ,
157
+ "heat" : "No heat" ,
158
+ "frontDoorDefective" : "Front door defective" ,
159
+ "frontDoorBroken" : "Front door broken" ,
160
+ "doorLockDefective" : "Door lock defective" ,
161
+ "doorLockBroken" : "Door lock broken" ,
162
+ "doorbellDefective" : "Doorbell defective" ,
163
+ "doorbellBroken" : "Doorbell broken" ,
164
+ "buzzerDefective" : "Buzzer defective" ,
165
+ "buzzerBroken" : "Buzzer broken" ,
166
+ "smoke" : "No Smoke detector" ,
167
+ "smokeDefective" : "Smoke detector defective" ,
168
+ "floorSags" : "Floor sags" ,
169
+ "apartmentPainting" : "Apartment needs painting"
170
+ } ,
171
+ "publicAreas" : {
172
+ "title" : "Public Areas" ,
173
+ "paintOverdue" : "Painting overdue (3 years)" ,
174
+ "peelingFlaking" : "Peeling/flaking paint" ,
175
+ "heat" : "@:checklist.entireHome.heat" ,
176
+ "hotWater" : "@:checklist.entireHome.hotWater" ,
177
+ "waterPressure" : "Inadequate water pressure" ,
178
+ "rusty" : "Rusty water" ,
179
+ "electricExposed" : "@:checklist.bedrooms.electricExposed" ,
180
+ "electricWeak" : "Weak electrical current (lights dim)" ,
181
+ "windowGuards" : "Window guards missing" ,
182
+ "smokeCO2" : "Missing/broken smoke/Co2 detector" ,
183
+ "fumesSmoke" : "Fumes/smoke entering apartment" ,
184
+ "ratsMice" : "Rats/Mice" ,
185
+ "bug" : "Bug Infestation" ,
186
+ "illegalImpartments" : "Illegal apartments in basement" ,
187
+ "noReceipts" : "No rent receipts given" ,
188
+ "incompleteReceipts" : "Rent receipts incomplete (no date/ NYC address for landlord, etc.)" ,
189
+ "inadequateSuper" : "Inadequate / no super service"
190
+ } ,
191
+ "landlordIssues" : {
192
+ "title" : "Landlord Issues" ,
193
+ "noReceipts" : "@:checklist.publicAreas.noReceipts" ,
194
+ "noReciepts" : "@:checklist.publicAreas.noReceipts" ,
195
+ "noLease" : "No lease" ,
196
+ "falseDocuments" : "False documents" ,
197
+ "illegalConstruction" : "Illegal construction" ,
198
+ "repeatedMci" : "Repeated MCI" ,
199
+ "overcharging" : "Overcharging" ,
200
+ "holdover" : "Holdover cases" ,
201
+ "useForce" : "Using force or threats of force" ,
202
+ "stopInterrupt" : "Stopping or interrupting essential services" ,
203
+ "stealing" : "Removing possessions from unit" ,
204
+ "changeLocks" : "Changing locks without supplying a new key" ,
205
+ "retaliation" : "Retaliation for seeking repairs" ,
206
+ "buyout" : "Constant buyout demands" ,
207
+ "falseEviction" : "Threatening eviction on false claims"
208
+ }
209
+ }
210
+ } ) ;
211
+
50
212
$translateProvider . useStaticFilesLoader ( {
51
213
prefix : 'languages/locale-' , // path to translations files
52
214
suffix : '.json' // suffix, currently- extension of the translations
0 commit comments