translation_center 1.6.4 → 1.6.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -144,14 +144,14 @@ module TranslationCenter
144
144
  end
145
145
 
146
146
  def children_translations(locale)
147
- TranslationKey.where('name LIKE ?', "#{self.name}%").inject({}) do |translations, child|
148
- translations[child.name.to_sym] = child.accepted_translation_in(locale).try(:value)
147
+ TranslationKey.where('name LIKE ?', "#{self.name}.%").inject({}) do |translations, child|
148
+ translations[child.name.split('.').last.to_sym] = child.accepted_translation_in(locale).try(:value)
149
149
  translations
150
150
  end
151
151
  end
152
152
 
153
153
  def has_children?
154
- TranslationKey.where('name LIKE ?', "#{self.name}.%").count > 1
154
+ TranslationKey.where('name LIKE ?', "#{self.name}.%").count >= 1
155
155
  end
156
156
 
157
157
  # adds a translation key with its translation to a translation yaml hash
@@ -41,7 +41,7 @@ namespace :translation_center do
41
41
  task :synch, [:locale ] => :environment do |t, args|
42
42
  begin
43
43
  if TranslationCenter::Category.any?
44
- puts "WARNING: You already have translations stored in the db, this action will destroy them. Are you sure, you want to continue? press [Y|n]]"
44
+ puts "WARNING: You already have translations stored in the db, this action will destroy them. Are you sure, you want to continue? press [Y|n]"
45
45
  confirm = $stdin.gets.chomp
46
46
 
47
47
  if confirm.blank? || confirm == 'y' || confirm == 'yes'
@@ -80,8 +80,8 @@ module TranslationCenter
80
80
  end
81
81
  wrap_span(val, translation_key)
82
82
  else
83
- # just return the normal I18n translation
84
- wrap_span(translate_without_adding(locale, key, options), translation_key)
83
+ translation_value = translate_without_adding(locale, key, options)
84
+ translation_value.class == Hash ? translation_value : wrap_span(translation_value, translation_key)
85
85
  end
86
86
  end
87
87
 
@@ -1,3 +1,3 @@
1
1
  module TranslationCenter
2
- VERSION = "1.6.4"
2
+ VERSION = "1.6.5"
3
3
  end
@@ -5,111 +5,6 @@ en:
5
5
  messages:
6
6
  record_invalid: "Validation failed: %{errors}"
7
7
  taken: "has already been taken"
8
- articles:
9
- index:
10
- content: Content
11
- title: Title
12
- authentications:
13
- edit:
14
- add_info: "Please Add your Email, country and telephone number to complete your signup"
15
- city: City
16
- country: Country
17
- email: Email
18
- mobile: "Mobile Number"
19
- name: Name
20
- select_city: "Select Your City"
21
- select_country: "Select Your Country"
22
- signup: "Sign Up"
23
- step_2_join_888: "Step Two: Join Waddat"
24
- failed: "Authentication Failed"
25
- classifieds:
26
- controller:
27
- missing_classified: "This classified cann't be found "
28
- form:
29
- add_map: "Add a Map"
30
- add_photo: "Add a Photo"
31
- add_photos: "Add Photos"
32
- address: Address
33
- auto_share_my_post_on: "Auto Share my post on"
34
- category*: Category*
35
- city: City
36
- country*: Country*
37
- create_new_classified: "Create New Classified"
38
- currency_not_blank: "should be selected"
39
- description: Description
40
- drag_and_drop_your_photos_here: "Drag and drop your photo(s) here"
41
- edit_classified: "Editing Classified"
42
- email: Email
43
- hide: Hide
44
- offered: Offered
45
- offf: "Off"
46
- onn: "On"
47
- or: Or
48
- post: Post
49
- price: Price
50
- select_categories: "Select a category"
51
- select_city: "Select a city"
52
- select_country: "Select a country"
53
- select_currency: "Select a currency"
54
- select_sub_categories: "Select a subcategory"
55
- show: Show
56
- sub_category*: "Sub Category*"
57
- tel: Tel.
58
- title: Title
59
- type: Type
60
- upload_photos: "Upload Photos"
61
- wanted: Wanted
62
- index:
63
- all_categories: "All Categories"
64
- all_countries: "All Countries"
65
- all_sub_countries: "All Sup-Categories"
66
- filter: Filter
67
- max: max
68
- min: min
69
- post_date: "Posted on or After"
70
- price_range: "Price Range"
71
- reset_filter: "Reset Filters"
72
- search_for: "Search for..."
73
- search_form: Search
74
- sub_cat: "Sub Categories"
75
- show:
76
- classified_open: "Mark as Open"
77
- classified_unsold: "Mark as Unsold"
78
- delete: Delete
79
- edit: Edit
80
- email: "Your Email"
81
- full_name: "Your Name"
82
- history: "Back to search resaults"
83
- mark_closed: "Mark as Closed"
84
- mark_open: "Mark as open"
85
- mark_sold: "Mark as Sold"
86
- mark_unsold: "Mark as Unsold"
87
- message: Message
88
- mobile_number: "Mobile Number"
89
- send: Send
90
- send_email: "Send Email"
91
- send_email_title: "Send Email to Advertiser"
92
- share: Share
93
- success_creation: "Congrate!! your classified pubblished successfully."
94
- tel: Tel
95
- single_classified:
96
- classified_open: "Mark as Open"
97
- classified_unsold: "Mark as Unsold"
98
- closed: Closed
99
- delete: Delete
100
- edit: Edit
101
- mark_closed: "Mark as Closed"
102
- mark_open: "Mark as open"
103
- mark_sold: "Mark as Sold"
104
- mark_unsold: "Mark as Unsold"
105
- offered: Offered
106
- share: Share
107
- sold: Sold
108
- wanted: Wanted
109
- custom_errors:
110
- confirmation_not_match: "doesn't match confirmation"
111
- max_5_photos: "Only five photos are allowed"
112
- profile_pic_fail: "Profile picture update has failed "
113
8
  date:
114
9
  abbr_day_names:
115
10
  - Sun
@@ -164,8 +59,6 @@ en:
164
59
  - !ruby/symbol month
165
60
  - !ruby/symbol day
166
61
  datetime:
167
- ago: ago
168
- day: day
169
62
  distance_in_words:
170
63
  about_x_hours:
171
64
  one: "about 1 hour"
@@ -211,10 +104,6 @@ en:
211
104
  devise:
212
105
  confirmations:
213
106
  confirmed: "Your account was successfully confirmed. You are now signed in."
214
- new:
215
- add_info: "Send me confirmation instructions"
216
- resend_confirmation: "Resend confirmation instructions"
217
- submit_confirmation: "Send instructions"
218
107
  send_instructions: "You will receive an email with instructions about how to confirm your account in a few minutes."
219
108
  send_paranoid_instructions: "If your email address exists in our database, you will receive an email with instructions about how to confirm your account in a few minutes."
220
109
  failure:
@@ -238,16 +127,6 @@ en:
238
127
  failure: "Could not authenticate you from %{kind} because \"%{reason}\"."
239
128
  success: "Successfully authenticated from %{kind} account."
240
129
  passwords:
241
- edit:
242
- change_password: "Change Your Password"
243
- confirm_new_pass: "Confirm New Password:"
244
- new_password: "New Password:"
245
- submit_new_password: "Submit new password"
246
- new:
247
- add_info: "Send me reset password instructions"
248
- email: Email
249
- forgot_password: "Forgot your password?"
250
- submit_password: "Send instructions"
251
130
  no_token: "You can't access this page without coming from a password reset email. If you do come from a password reset email, please make sure you used the full URL provided."
252
131
  send_instructions: "You will receive an email with instructions about how to reset your password in a few minutes."
253
132
  send_paranoid_instructions: "If your email address exists in our database, you will receive a password recovery link at your email address in a few minutes."
@@ -255,26 +134,6 @@ en:
255
134
  updated_not_active: "Your password was changed successfully."
256
135
  registrations:
257
136
  destroyed: "Bye! Your account was successfully cancelled. We hope to see you again soon."
258
- edit:
259
- cancel: Cancel
260
- change: Change
261
- change_password: "Change Your Password"
262
- confirm_new_pass: "Confirm new Password"
263
- current_passwd: "Current Password"
264
- new_password: "New Password"
265
- new:
266
- confirm_password: "Confirm Password"
267
- email: Email
268
- email_signup: "Sign Up with your Email"
269
- facebook_signup: "Sign up with Facebook"
270
- full_name: "Full Name"
271
- google_signup: "Sign up with Google"
272
- mobile: Mobile
273
- or: Or
274
- password: Password
275
- select_country: "Select Country"
276
- signup: "Sign Up"
277
- twitter_signup: "Sign up with Twitter"
278
137
  signed_up: "Welcome! You have signed up successfully."
279
138
  signed_up_but_inactive: "You have signed up successfully. However, we could not sign you in because your account is not yet activated."
280
139
  signed_up_but_locked: "You have signed up successfully. However, we could not sign you in because your account is locked."
@@ -282,36 +141,12 @@ en:
282
141
  update_needs_confirmation: "You updated your account successfully, but we need to verify your new email address. Please check your email and click on the confirm link to finalize confirming your new email address."
283
142
  updated: "You updated your account successfully."
284
143
  sessions:
285
- new:
286
- create_account: "Create New Account"
287
- email: Email
288
- email_signup: "Sign Up with your Email"
289
- facebook_signin: "Sign in with Facebook"
290
- forgot_password: "Forgot Password"
291
- google_signin: "Sign in with Google"
292
- login: "Sign In"
293
- or: Or
294
- password: Password
295
- twitter_signin: "Sign in with Twitter"
296
144
  signed_in: "Signed in successfully."
297
145
  signed_out: "Signed out successfully."
298
- shared:
299
- links:
300
- confirmations_instruction: "Didn't receive confirmation instructions?"
301
- forget_password: "Forgot your password?"
302
- unlock: "Didn't receive unlock instructions?"
303
146
  unlocks:
304
147
  send_instructions: "You will receive an email with instructions about how to unlock your account in a few minutes."
305
148
  send_paranoid_instructions: "If your account exists, you will receive an email with instructions about how to unlock it in a few minutes."
306
149
  unlocked: "Your account has been unlocked successfully. Please sign in to continue."
307
- email_messages:
308
- errors_title:
309
- one: "1 error prohibited this email from being sent:"
310
- other: "%{count} errors prohibited this email from being sent:"
311
- invalid_email: "Invalid email"
312
- missing_email: "email can't be blank"
313
- missing_name: "name can't be blank"
314
- sent_successfully: "sent successfully"
315
150
  errors:
316
151
  format: "%{attribute} %{message}"
317
152
  messages:
@@ -327,7 +162,6 @@ en:
327
162
  expired: "has expired, please request a new one"
328
163
  greater_than: "must be greater than %{count}"
329
164
  greater_than_or_equal_to: "must be greater than or equal to %{count}"
330
- in_between: "must be in between %{min} and %{max}"
331
165
  inclusion: "is not included in the list"
332
166
  invalid: "is invalid"
333
167
  less_than: "must be less than %{count}"
@@ -343,135 +177,17 @@ en:
343
177
  too_long: "is too long (maximum is %{count} characters)"
344
178
  too_short: "is too short (minimum is %{count} characters)"
345
179
  wrong_length: "is the wrong length (should be %{count} characters)"
346
- flash:
347
- message:
348
- account_deleted: "Your account has been deleted"
349
- classified_created: "Congrate!! your classified published successfully. Now Share it to your social networks."
350
- email_sent: "Email sent successfully"
351
- insufficient_priviledge: "You don't have sufficient priviledges, redirect to home page"
352
- signed_up_but_unconfirmed: "Awaiting email confirmation. Check your email first!!."
353
- signed_up_but_unconfirmed_email: "Awaiting email confirmation. Check your email first!!. %{email}"
354
- user_email_change_update: "A message with a confirmation link has been sent to your new email address. Please open the link to confirm your new email address."
355
- user_profile_info_update: "Your profile info has been updated"
356
- user_profile_pic_update: "Your profile picture has been updated"
357
- user_subscriptions_update: "Your subscription has been updated"
358
180
  helpers:
359
181
  button:
360
182
  create: "Create %{model}"
361
183
  submit: "Save %{model}"
362
184
  update: "Update %{model}"
363
- page_entries_info:
364
- more_pages:
365
- display_entries: "Displaying %{entry_name} <b>%{first}&nbsp;-&nbsp;%{last}</b> of <b>%{total}</b> in total"
366
- one_page:
367
- display_entries:
368
- one: "Displaying <b>1</b> %{entry_name}"
369
- other: "Displaying <b>all %{count}</b> %{entry_name}"
370
- zero: "No %{entry_name} found"
371
185
  select:
372
186
  prompt: "Please select"
373
187
  submit:
374
188
  create: "Create %{model}"
375
189
  submit: "Save %{model}"
376
190
  update: "Update %{model}"
377
- home:
378
- home_bottom:
379
- recent_watched_10: "Latest Posts"
380
- recent_watched_3: "Recently viewed items"
381
- home_category_filter:
382
- all: All
383
- home_classifieds:
384
- no_result: "No result found"
385
- home_filter:
386
- all: All
387
- search_for: "Search for... "
388
- search_form: Search
389
- layouts:
390
- add_photo:
391
- cancel: Cancel
392
- choose_from_gallery: "Choose from gallery"
393
- take_new_photo: "Take a New photo"
394
- application:
395
- about_us: "About Us"
396
- all_categories: "All Categories"
397
- arabic: Arabic
398
- browse_categories: "Browse Categories"
399
- cancel: Cancel
400
- cancle: Cancle
401
- classified: Classifieds
402
- classified_closed: "Mark as Closed"
403
- classified_closed_msg: "Confirm Classified has Closed!"
404
- classified_open: "Mark as Open"
405
- classified_open_msg: "Confirm Classified is open!"
406
- classified_sold: "Mark as Sold"
407
- classified_sold_msg: "Confirm Classified has sold!"
408
- classified_unsold: "Mark as Unsold"
409
- classified_unsold_msg: "Confirm Classified is unsold!"
410
- classifieds: Classifieds
411
- confirm: "Confirm "
412
- contact_us: "Contact Us"
413
- delete: Delete
414
- delete_classified: "Delete Classified"
415
- delete_classified_msg: "Are you sure you want to delete this Classified?"
416
- english: English
417
- home: Home
418
- left: Left
419
- middle: Middle
420
- post: Post
421
- post_classified: "Post a Classified"
422
- privacy_policy: "privacy policy"
423
- profile: Profile
424
- right: Right
425
- search: Search
426
- share_text_end: " on #waddat"
427
- share_text_intro: "I just found "
428
- signin: "Sign in"
429
- signout: "Sign Out"
430
- signup: "Sign up"
431
- subscriptions: Subscriptions
432
- switch_lang: عربي
433
- terms_conditions: "Terms and Conditions"
434
- title: "888"
435
- error_messages:
436
- title:
437
- one: "1 error prohibited this %{model} from being saved:"
438
- other: "%{count} errors prohibited this %{model} from being saved:"
439
- footer:
440
- about_us: "About Us"
441
- contact_us: "Contact Us"
442
- home: Home
443
- privacy_policy: "Privacy Policy"
444
- signout: Signout
445
- terms_conditions: "Term of Use"
446
- home_layout:
447
- admin: "Admin page"
448
- all_countires: "All Countries"
449
- cancel: Cancel
450
- change: Change
451
- change_country: "Change Country"
452
- classified: Classified
453
- classifieds: Classifieds
454
- home_eader_text: "Sell and Find Faster With The Help of Your Community"
455
- login: "Sign In "
456
- profile: Profile
457
- search_classified: "Search Classified in "
458
- select_country: "Select Country "
459
- sign_out: "Sign Out"
460
- sign_up: "Sign Up"
461
- subscriptions: Subscriptions
462
- ma_options:
463
- add_current_location: "Add current location"
464
- cancel: Cancel
465
- use_google_map: "Use Google map"
466
- mobile_luncher_footer:
467
- classified: Classified
468
- profile: Profile
469
- subscriptions: Subscriptions
470
- static_side_luncher:
471
- about_us: "About Us"
472
- contact_us: "Contact Us"
473
- privacy_policy: "Privacy Policy"
474
- terms_conditions: "Term of Use"
475
191
  meta_search:
476
192
  or: or
477
193
  predicates:
@@ -495,30 +211,18 @@ en:
495
211
  less_than_or_equal_to: "%{attribute} less than or equal to"
496
212
  not_in: "%{attribute} isn't one of"
497
213
  starts_with: "%{attribute} starts with"
498
- models:
499
- classified:
500
- offered: Offered
501
- wanted: Wanted
502
- subscriptions:
503
- daily: Daily
504
- weekly: Weekly
505
- when_posted: "When Posted"
506
- notifier:
507
- newsletter_classified:
508
- notification_settings: "notification settings"
509
- unsubscribe: unsubscribe
510
- send_email:
511
- body_footer: "Thanks, waddat Team."
512
- body_header: "%{name} sent you the following message while viewing '%{classified_title}' %{classified_url} :"
513
- email: Email
514
- message: Message
515
- name: Name
516
- phone: Phone
517
- subject: "New message from 08-08-08"
518
214
  number:
519
215
  currency:
520
- format: Format
521
- format: Format
216
+ format:
217
+ delimiter: ","
218
+ format: "%u%n"
219
+ precision: 2
220
+ separator: "."
221
+ unit: $
222
+ format:
223
+ delimiter: ","
224
+ precision: 3
225
+ separator: "."
522
226
  human:
523
227
  decimal_units:
524
228
  format: "%n %u"
@@ -542,41 +246,6 @@ en:
542
246
  kb: KB
543
247
  mb: MB
544
248
  tb: TB
545
- precision:
546
- format: Format
547
- photos:
548
- gallery:
549
- upload_photos: "Upload Photos"
550
- list_image:
551
- confirm_deletion: "Delete this image? (undoable)"
552
- search:
553
- classifieds_result:
554
- all: "All "
555
- for: " for "
556
- for_all: " for All"
557
- in: " in "
558
- initial_search_text: "Search All Categories in All Countries"
559
- no_result: "No result found"
560
- search_all: "Search "
561
- index:
562
- all_categories: "All Categories"
563
- all_countries: "All Countries"
564
- all_sub_countries: "All Sup-Categories"
565
- filter: Filter
566
- max: max
567
- min: min
568
- post_date: "Posted on or After"
569
- price_range: "Price Range"
570
- refine_result: "Refine Result"
571
- reset_filter: "Reset Filters"
572
- search_for: "Search for..."
573
- search_form: Search
574
- select_a_category: "Select a Category"
575
- select_a_sub_category: "Select a subcategory"
576
- sub_cat: "Sub Categories"
577
- single_classified:
578
- offered: Offered
579
- wanted: Wanted
580
249
  support:
581
250
  array:
582
251
  last_word_connector: ", and "
@@ -608,12 +277,8 @@ en:
608
277
  activity:
609
278
  ago: ago
610
279
  changes: Changes
611
- first: First
612
280
  key: Key
613
- last: Last
614
281
  locale: Locale
615
- next: Next
616
- of: Of
617
282
  time: Time
618
283
  user: User
619
284
  dashboard:
@@ -644,7 +309,6 @@ en:
644
309
  show_keys:
645
310
  created_on: "created on"
646
311
  translated: Translated
647
- untranslated: Untranslated
648
312
  translation_keys:
649
313
  no_translation_keys: "No Translation Keys"
650
314
  translations:
@@ -652,119 +316,11 @@ en:
652
316
  unaccept: Unaccept
653
317
  index:
654
318
  date: Date
655
- no_translations_available: "No Translations Available"
656
319
  sort_by: "Sort by"
657
- votes: Votes
658
320
  votings: Votes
659
321
  show:
660
322
  by: by
661
323
  on_date: "on"
662
324
  vote: Vote
663
- votes: Votes
664
325
  votings: Votes
665
326
  you: You
666
- user:
667
- show:
668
- undefined: Undefined
669
- users:
670
- profile:
671
- browse_categories: "Browse Category"
672
- cancel: Cancel
673
- change: Change
674
- change_passwd: "Change password"
675
- confirm_new_pass: "Confirm New Password:"
676
- current_passwd: "Current Password:"
677
- edit_photo: "Edit photo"
678
- new_password: "New Password:"
679
- profile: Profile
680
- remove_account: "Remove Account"
681
- save: Save
682
- sign_out: "Sign Out"
683
- profile_form:
684
- cancel: Cancel
685
- change: change
686
- change_passwd: "Change password"
687
- city: City
688
- classified: Classifieds
689
- country: Country
690
- delete_account: "Delete your account"
691
- email: "Email: "
692
- full_name: "Full name"
693
- location: Location
694
- mobile: Mobile
695
- remove_account_msg: "Are you sure you want to Delete your account?"
696
- save: Save
697
- select_city: "Select city"
698
- select_country: "Select country"
699
- tel: "Tel: "
700
- undefined: Undefined
701
- user_name: "Name: "
702
- profile_side_luncher:
703
- classified: Classifieds
704
- profile: Profile
705
- subscriptions: Subscriptions
706
- subscription:
707
- subscriptions: Subscriptions
708
- subscriptions_form:
709
- and: and
710
- another_category: "Add another interest category"
711
- another_locations: "Add another location"
712
- auto_share: "Auto Share my post on"
713
- cancel: Cancel
714
- intersted_in: "Interested in :"
715
- newsletter: "Receive newsletter over emails: "
716
- newsletter_period: "Receive newsletter each: "
717
- polocy: "privacy policy"
718
- privacy_policy: "privacy policy"
719
- read_888: "Read 08-08-08"
720
- save: Save
721
- share_options: "Sharing option"
722
- terms: "terms and Conditions"
723
- terms_conditions: "terms and conditions"
724
- user_category_fields:
725
- remove: Remove
726
- select_main: "Select Category"
727
- select_sub: "Select Sub-Category"
728
- user_classifieds:
729
- no_classified: "You don't have classifieds yet"
730
- user_location_fields:
731
- city: City
732
- country: Country
733
- remove: Remove
734
- select_city: "Select a city"
735
- select_country: "Select Country"
736
- user_photo:
737
- edit_photo: "Edit photo"
738
- user_single_classified:
739
- classified_open: "Mark as Open"
740
- classified_unsold: "Mark as Unsold"
741
- delete: Delete
742
- edit: Edit
743
- mark_closed: "Mark as Closed"
744
- mark_open: "Mark as open"
745
- mark_sold: "Mark as Sold"
746
- mark_unsold: "Mark as Unsold"
747
- offered: Offered
748
- wanted: Wanted
749
- views:
750
- pagination:
751
- first: «
752
- last: »
753
- next: "&rsaquo;"
754
- previous: "&lsaquo;"
755
- truncate: "&hellip;"
756
- will_paginate:
757
- next_label: "Next &#8594;"
758
- page_entries_info:
759
- multi_page: "Displaying %{model} %{from} - %{to} of %{count} in total"
760
- multi_page_html: "Displaying %{model} <b>%{from}&nbsp;-&nbsp;%{to}</b> of <b>%{count}</b> in total"
761
- single_page:
762
- one: "Displaying 1 %{model}"
763
- other: "Displaying all %{count} %{model}"
764
- zero: "No %{model} found"
765
- single_page_html:
766
- one: "Displaying <b>1</b> %{model}"
767
- other: "Displaying <b>all&nbsp;%{count}</b> %{model}"
768
- zero: "No %{model} found"
769
- page_gap: "&hellip;"
770
- previous_label: "&#8592; Previous"
@@ -33,7 +33,7 @@ development:
33
33
  inspector: 'all' # default missing
34
34
 
35
35
  # I18n.translate source
36
- i18n_source: 'db' # can be db or yaml; default is db
36
+ i18n_source: 'yaml' # can be db or yaml; default is db
37
37
 
38
38
  # when a new key is added to db, the value of the key is added as the default translation in English
39
39
  save_default_translation: true