ref: refs/heads/basesystem commit 9b10dca6aa02d423d192847de7e030798ee8f336 Author: Stefan Schubert <schubi@suse.de> Date: Fri Sep 4 10:07:00 2009 +0200 improved logging,doku --- .../app/controllers/application_controller.rb | 8 +++++--- webclient/public/vendor/text/README | 6 ++++++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/webclient/app/controllers/application_controller.rb b/webclient/app/controllers/application_controller.rb index be2b909..cbf9da7 100644 --- a/webclient/app/controllers/application_controller.rb +++ b/webclient/app/controllers/application_controller.rb @@ -64,22 +64,24 @@ class ApplicationController < ActionController::Base end def self.init_gettext(domainname, options = {}) - logger.info "Loading textdomain: #{domainname}" locale_path = options[:locale_path] unless locale_path #If path of the translation has not been set we are trying to load #vendor specific translations too if Dir.glob(File.join("**", "public", "**", "#{domainname}.mo")).size > 0 - locale_path = File.join(RAILS_ROOT, "public/vendor/text/locale") + vendor_text_path = "public/vendor/text/locale" + locale_path = File.join(RAILS_ROOT, vendor_text_path) opt = {:locale_path => locale_path}.merge(options) - logger.info "Loading VENDOR textdomain in #{locale_path}" + logger.info "Loading textdomain #{domainname} from #{vendor_text_path}" ActionController::Base.init_gettext(domainname, opt) else #load default no vendor translation available + logger.info "Loading standard textdomain #{domainname}" ActionController::Base.init_gettext(domainname, options) end else #load default if the path has been given + logger.info "Loading textdomain #{domainname} from #{locale_path}" ActionController::Base.init_gettext(domainname, options) end end diff --git a/webclient/public/vendor/text/README b/webclient/public/vendor/text/README new file mode 100644 index 0000000..d3f3170 --- /dev/null +++ b/webclient/public/vendor/text/README @@ -0,0 +1,6 @@ +This directory is used for vendor specific translation. +It is useful when text has to be changed for special cases. + +For more information please have a look to: + +http://en.opensuse.org/YaST/Web/Development/TrainingKit#Changing_Text \ No newline at end of file -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org