Class: Jekyll::Task::I18n::Path
- Inherits:
-
Object
- Object
- Jekyll::Task::I18n::Path
- Defined in:
- lib/jekyll/task/i18n.rb
Instance Attribute Summary collapse
-
#locale ⇒ Object
readonly
Returns the value of attribute locale.
Instance Method Summary collapse
- #all_po_file ⇒ Object
- #base_po_dir ⇒ Object
- #edit_po_file ⇒ Object
-
#initialize(po_dir_path, locale, target_file_path = nil) ⇒ Path
constructor
A new instance of Path.
- #po_dir ⇒ Object
- #po_file ⇒ Object
- #pot_file ⇒ Object
- #target_file ⇒ Object
- #target_file_base ⇒ Object
- #time_stamp_file ⇒ Object
- #translated_file ⇒ Object
- #translated_file_dir ⇒ Object
Constructor Details
#initialize(po_dir_path, locale, target_file_path = nil) ⇒ Path
Returns a new instance of Path.
299 300 301 302 303 |
# File 'lib/jekyll/task/i18n.rb', line 299 def initialize(po_dir_path, locale, target_file_path=nil) @po_dir_path = po_dir_path @locale = locale @target_file_path = target_file_path end |
Instance Attribute Details
#locale ⇒ Object (readonly)
Returns the value of attribute locale.
298 299 300 |
# File 'lib/jekyll/task/i18n.rb', line 298 def locale @locale end |
Instance Method Details
#all_po_file ⇒ Object
313 314 315 |
# File 'lib/jekyll/task/i18n.rb', line 313 def all_po_file @po_dir_path + "#{@locale}.po" end |
#base_po_dir ⇒ Object
309 310 311 |
# File 'lib/jekyll/task/i18n.rb', line 309 def base_po_dir @po_dir_path + @locale end |
#edit_po_file ⇒ Object
333 334 335 |
# File 'lib/jekyll/task/i18n.rb', line 333 def edit_po_file po_dir + "#{target_file_base}.edit.po" end |
#po_dir ⇒ Object
321 322 323 |
# File 'lib/jekyll/task/i18n.rb', line 321 def po_dir base_po_dir + @target_file_path.dirname end |
#po_file ⇒ Object
325 326 327 |
# File 'lib/jekyll/task/i18n.rb', line 325 def po_file po_dir + "#{target_file_base}.po" end |
#pot_file ⇒ Object
337 338 339 |
# File 'lib/jekyll/task/i18n.rb', line 337 def pot_file po_dir + "#{target_file_base}.pot" end |
#target_file ⇒ Object
305 306 307 |
# File 'lib/jekyll/task/i18n.rb', line 305 def target_file @target_file_path end |
#target_file_base ⇒ Object
317 318 319 |
# File 'lib/jekyll/task/i18n.rb', line 317 def target_file_base @target_file_path.basename(".*") end |
#time_stamp_file ⇒ Object
329 330 331 |
# File 'lib/jekyll/task/i18n.rb', line 329 def time_stamp_file po_dir + "#{target_file_base}.time_stamp" end |
#translated_file ⇒ Object
341 342 343 |
# File 'lib/jekyll/task/i18n.rb', line 341 def translated_file Pathname(@locale) + @target_file_path end |
#translated_file_dir ⇒ Object
345 346 347 |
# File 'lib/jekyll/task/i18n.rb', line 345 def translated_file_dir Pathname(@locale) + @target_file_path end |