browsercmsi 3.1.0 → 3.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.markdown +50 -4
- data/browsercmsi.gemspec +4 -4
- data/doc/guides/html/building_templates.html +2 -2
- data/lib/{browsercms.rb → browsercmsi.rb} +0 -0
- data/lib/cms/behaviors/archiving.rb +4 -4
- data/lib/cms/version.rb +1 -1
- data/templates/blank.rb +1 -1
- metadata +5 -5
data/README.markdown
CHANGED
@@ -17,8 +17,8 @@ anything special.
|
|
17
17
|
|
18
18
|
## Translating BrowserCMS
|
19
19
|
|
20
|
-
If your are not already familiar with Rails Internationalization API,
|
21
|
-
to take a quick look at
|
20
|
+
If your are not already familiar with the [Rails Internationalization API](http://guides.rubyonrails.org/i18n.html),
|
21
|
+
it might be a good idea for you to take a quick look at it first.
|
22
22
|
|
23
23
|
To translate BrowserCMS' UI to a new language you need to create your new locale files and 12 images
|
24
24
|
for the main toolbar.
|
@@ -31,6 +31,12 @@ for the main toolbar.
|
|
31
31
|
the locale key.
|
32
32
|
* Restart your server and start translating.
|
33
33
|
|
34
|
+
You can swap between locales using the buttons at the top of the toolbar. You'll see one button for
|
35
|
+
each locale key you have on your installation. You will not see these buttons on a production site
|
36
|
+
since their purpose is only to let you swap locales while you are translating the UI to a new language
|
37
|
+
during development. Not only you will not see the buttons on production but the route to swap locales
|
38
|
+
is not even mapped.
|
39
|
+
|
34
40
|
**Note about locale keys** Although neither Rails or BrowserCMSI really care which locale keys you use,
|
35
41
|
if you use the ISO 639-1 code for your language, BrowserCMSI will set CKEditor locale automatically for you. If you
|
36
42
|
use non-standard locale keys, CKEditor will fallback to English.
|
@@ -39,17 +45,57 @@ use non-standard locale keys, CKEditor will fallback to English.
|
|
39
45
|
|
40
46
|
BCMS uses 4 sets of images for the links in the main toolbar: My Dashboard, Sitemap, Content Library and Administration.
|
41
47
|
You need to create one image for the up, over and active states of each link. You can use a .psd file
|
42
|
-
located in doc/design on this repository.
|
48
|
+
located in doc/design on this repository. (Take a look at public/images/cms/locales/en and name your new images accordingly)
|
43
49
|
|
44
50
|
Once you have your images, you need to place them in a new directory under public/images/cms/locales. Name
|
45
51
|
this directory exactly the same as your locale files directory. (fr to continue with the french example).
|
46
52
|
|
53
|
+
## Translating seed data
|
54
|
+
|
55
|
+
When you run rake db:migrate after creating a new project, BrowserCMS seeds some data on the database.
|
56
|
+
The locale file for these records is bootstrap.yml. Changes made to this locale file will not take
|
57
|
+
effect when you change the locale (either with the toolbar buttons or in the initializer i18n.rb).
|
58
|
+
You'll need to run the migrations again to see these changes.
|
59
|
+
|
60
|
+
rake db:migrate VERSION=0
|
61
|
+
rake db:migrate
|
62
|
+
|
47
63
|
|
48
64
|
## Locale files organization
|
49
65
|
|
66
|
+
There is really no 'correct' way to organize the locale files. As far as the Rails i18n API is
|
67
|
+
concerned, you can place all translation strings in a single file, so you can move them around
|
68
|
+
as you see fit as long as the data structure represented in YAML does not change.
|
69
|
+
|
70
|
+
When organizing the locale files (and the hash structure) I tried to find a balance between
|
71
|
+
having a logical, easy to follow structure and not having insanely long key paths.
|
72
|
+
|
73
|
+
Locale files are organized in a way that 'mostly' resembles BrowserCMS' file structure so it should
|
74
|
+
be very easy to follow what goes where. The bulk of the translation work is done in views
|
75
|
+
and layouts.
|
76
|
+
|
77
|
+
Here's a brief description of the files:
|
78
|
+
|
79
|
+
* **behaviors.yml** contains translation strings for a few BCMS' modules that add behaviors to
|
80
|
+
models. -> lib/cms/behaviors/*
|
81
|
+
* **bootstrap.yml** contains translation string for BCMS's migrations. -> db/migrate/*
|
82
|
+
* **controllers.yml** contains flash messages translation strings -> app/controllers/cms/*
|
83
|
+
* **helpers.yml** contains translation strings for helpers. -> app/helpers/cms/*
|
84
|
+
* **js.yml** contains translations strings for javascript functions. -> public/javascripts/cms/sitemap.js
|
85
|
+
* **models.yml** contains standard ActiveRecord model, attribute and error messages translation strings
|
86
|
+
plus some custom BCMS' instance and class methods -> app/models/*
|
87
|
+
* **portlets.yml** contains translation strings for BCMS' bulit in portlets -> app/portlets/*
|
88
|
+
* **views/** contains translation strings for BCMS' views -> app/views/\*\*/*
|
89
|
+
|
90
|
+
## Versioning
|
91
|
+
|
92
|
+
BrowserCMSI's only concern is to localize BrowserCMS' UI. It does not add, remove or modify
|
93
|
+
BrowserCMS's core features in any way. As such, BrowserCMSI's versioning mirrors BrowserCMS'.
|
94
|
+
|
95
|
+
|
50
96
|
## Contact
|
51
97
|
Juan Alvarez
|
52
|
-
|
98
|
+
alce{{at}}mac[[dot]]com
|
53
99
|
|
54
100
|
|
55
101
|
|
data/browsercmsi.gemspec
CHANGED
@@ -5,12 +5,12 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{browsercmsi}
|
8
|
-
s.version = "3.1.
|
8
|
+
s.version = "3.1.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Juan Alvarez"]
|
12
|
-
s.date = %q{2010-
|
13
|
-
s.description = %q{
|
12
|
+
s.date = %q{2010-04-04}
|
13
|
+
s.description = %q{BrowserCMSI adds internationalization to BrowserMedia's BrowserCMS}
|
14
14
|
s.email = %q{alce@mac.com}
|
15
15
|
s.executables = ["browsercmsi", "bcmsi"]
|
16
16
|
s.extra_rdoc_files = [
|
@@ -723,7 +723,7 @@ Gem::Specification.new do |s|
|
|
723
723
|
"doc/guides/html/user_guide.html",
|
724
724
|
"doc/guides/html/writing_guides.html",
|
725
725
|
"lib/acts_as_list.rb",
|
726
|
-
"lib/
|
726
|
+
"lib/browsercmsi.rb",
|
727
727
|
"lib/cms/acts/content_block.rb",
|
728
728
|
"lib/cms/acts/content_page.rb",
|
729
729
|
"lib/cms/authentication/controller.rb",
|
@@ -229,14 +229,14 @@
|
|
229
229
|
<p>This section covers a reference for all the tags (aka Helper Methods) that can be used in Page Templates to render various elements. Here is a quick list of the available tags, their purpose and whether they are required or not.</p>
|
230
230
|
<p>._ Name |<em>. Purpose | Required? |
|
231
231
|
| <tt>container</tt> | A named area that allows users to add/edit content | Yes |
|
232
|
-
| <tt>
|
232
|
+
| <tt>cms_toolbar</tt> | Renders the <span class="caps">CMS</span> toolbar controller required for editing and navigation. Should be very first element in <tt>body</tt> | Yes |
|
233
233
|
| <tt>yield :html_head | This allows the CMS to insert javascript and other information into the page. Should be last element in </tt>head+ | Yes |
|
234
234
|
| <tt>page_title</tt> | Inserts the ‘Name’ of the page (or ‘Title’ if it exists) | No |
|
235
235
|
| <tt>current_page</tt> | Returns a reference to the <tt>Page</tt> object that is currently being rendered | No |
|
236
236
|
| <tt>render_breadcrumbs</tt> | Generates breadcrumbs based on the current page and its location in the sitemap | No |
|
237
237
|
| <tt>render_menu</tt> | Generates a menu based on the current page and its location in the sitemap | No |
|
238
238
|
| <tt>render_portlet</tt> | Renders a specific portlet by name | No |
|
239
|
-
| <tt>
|
239
|
+
| <tt>render</em>connectable</tt></notextile> | Renders a specific content block | No |</p>
|
240
240
|
<p>In addition, since Page Templates are Rails layouts, you can make use of any of the Asset Tags":http://guides.rubyonrails.org/layouts_and_rendering.html#structuring-layouts like <tt>stylesheet_link_tag</tt> or <tt>image_tag</tt>.</p>
|
241
241
|
<h4 id="required-tags">3.1 Required Tags</h4>
|
242
242
|
<p>While most of the tags are optional, there are several tags which must be included or page template just won’t work correctly. Here’s the minimum necessary tags required.</p>
|
File without changes
|
@@ -19,22 +19,22 @@ module Cms
|
|
19
19
|
module InstanceMethods
|
20
20
|
def archive
|
21
21
|
self.archived = true
|
22
|
-
self.version_comment = "
|
22
|
+
self.version_comment = I18n.t("behaviors.archiving.archived")
|
23
23
|
self.save
|
24
24
|
end
|
25
25
|
def archive!
|
26
26
|
self.archived = true
|
27
|
-
self.version_comment = "
|
27
|
+
self.version_comment = I18n.t("behaviors.archiving.archived")
|
28
28
|
self.save!
|
29
29
|
end
|
30
30
|
def unarchive
|
31
31
|
self.archived = false
|
32
|
-
self.version_comment = "
|
32
|
+
self.version_comment = I18n.t("behaviors.archiving.unarchived")
|
33
33
|
self.save
|
34
34
|
end
|
35
35
|
def unarchive!
|
36
36
|
self.archived = false
|
37
|
-
self.version_comment = "
|
37
|
+
self.version_comment = I18n.t("behaviors.archiving.unarchived")
|
38
38
|
self.save!
|
39
39
|
end
|
40
40
|
end
|
data/lib/cms/version.rb
CHANGED
data/templates/blank.rb
CHANGED
@@ -10,7 +10,7 @@ end
|
|
10
10
|
# Loads the version, so we can explicitly set in the generated cms project.
|
11
11
|
template_root = File.dirname(File.expand_path(template))
|
12
12
|
require File.join(template_root, '..', 'lib', 'cms', 'version.rb')
|
13
|
-
gem "browsercmsi", :lib => "
|
13
|
+
gem "browsercmsi", :lib => "browsercmsi", :version=>Cms::VERSION
|
14
14
|
|
15
15
|
generate :jdbc if defined?(JRUBY_VERSION)
|
16
16
|
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 3
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
version: 3.1.
|
8
|
+
- 1
|
9
|
+
version: 3.1.1
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Juan Alvarez
|
@@ -14,11 +14,11 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-
|
17
|
+
date: 2010-04-04 00:00:00 -06:00
|
18
18
|
default_executable:
|
19
19
|
dependencies: []
|
20
20
|
|
21
|
-
description:
|
21
|
+
description: BrowserCMSI adds internationalization to BrowserMedia's BrowserCMS
|
22
22
|
email: alce@mac.com
|
23
23
|
executables:
|
24
24
|
- browsercmsi
|
@@ -734,7 +734,7 @@ files:
|
|
734
734
|
- doc/guides/html/user_guide.html
|
735
735
|
- doc/guides/html/writing_guides.html
|
736
736
|
- lib/acts_as_list.rb
|
737
|
-
- lib/
|
737
|
+
- lib/browsercmsi.rb
|
738
738
|
- lib/cms/acts/content_block.rb
|
739
739
|
- lib/cms/acts/content_page.rb
|
740
740
|
- lib/cms/authentication/controller.rb
|