if raise_errors
raise e
elsif mylogger
- mylogger.error "The following error occured while sending email notification: \"#{e.message}\". Check your configuration in config/email.yml."
+ mylogger.error "The following error occured while sending email notification: \"#{e.message}\". Check your configuration in config/configuration.yml."
end
ensure
self.class.raise_delivery_errors = raise_errors
--- /dev/null
+# = Redmine configuration file
+#
+# Each environment has it's own configuration options. If you are only
+# running in production, only the production block needs to be configured.
+# Environment specific configuration options override the default ones.
+#
+# Note that this file needs to be a valid YAML file.
+#
+# == Outgoing email settings (email_delivery setting)
+#
+# === Common configurations
+#
+# ==== Sendmail command
+#
+# production:
+# email_delivery:
+# delivery_method: :sendmail
+#
+# ==== Simple SMTP server at localhost
+#
+# production:
+# email_delivery:
+# delivery_method: :smtp
+# smtp_settings:
+# address: "localhost"
+# port: 25
+#
+# ==== SMTP server at example.com using LOGIN authentication and checking HELO for foo.com
+#
+# production:
+# email_delivery:
+# delivery_method: :smtp
+# smtp_settings:
+# address: "example.com"
+# port: 25
+# authentication: :login
+# domain: 'foo.com'
+# user_name: 'myaccount'
+# password: 'password'
+#
+# ==== SMTP server at example.com using PLAIN authentication
+#
+# production:
+# email_delivery:
+# delivery_method: :smtp
+# smtp_settings:
+# address: "example.com"
+# port: 25
+# authentication: :plain
+# domain: 'example.com'
+# user_name: 'myaccount'
+# password: 'password'
+#
+# ==== SMTP server at using TLS (GMail)
+#
+# This requires some additional configuration. See the article at:
+# http://redmineblog.com/articles/setup-redmine-to-send-email-using-gmail/
+#
+# production:
+# email_delivery:
+# delivery_method: :smtp
+# smtp_settings:
+# tls: true
+# address: "smtp.gmail.com"
+# port: 587
+# domain: "smtp.gmail.com" # 'your.domain.com' for GoogleApps
+# authentication: :plain
+# user_name: "your_email@gmail.com"
+# password: "your_password"
+#
+#
+# === More configuration options
+#
+# See the "Configuration options" at the following website for a list of the
+# full options allowed:
+#
+# http://wiki.rubyonrails.org/rails/pages/HowToSendEmailsWithActionMailer
+
+
+# default configuration options for all environments
+default:
+ email_delivery:
+ delivery_method: :smtp
+ smtp_settings:
+ address: smtp.example.net
+ port: 25
+ domain: example.net
+ authentication: :login
+ user_name: "redmine@example.net"
+ password: "redmine"
+
+# specific configuration options for production environment
+# that overrides the default ones
+production:
+
+# specific configuration options for development environment
+# that overrides the default ones
+development:
+++ /dev/null
-# = Outgoing email settings
-#
-# Each environment has it's own configuration options. If you are only
-# running in production, only the production block needs to be configured.
-#
-# == Common configurations
-#
-# === Sendmail command
-#
-# production:
-# delivery_method: :sendmail
-#
-# === Simple SMTP server at localhost
-#
-# production:
-# delivery_method: :smtp
-# smtp_settings:
-# address: "localhost"
-# port: 25
-#
-# === SMTP server at example.com using LOGIN authentication and checking HELO for foo.com
-#
-# production:
-# delivery_method: :smtp
-# smtp_settings:
-# address: "example.com"
-# port: 25
-# authentication: :login
-# domain: 'foo.com'
-# user_name: 'myaccount'
-# password: 'password'
-#
-# === SMTP server at example.com using PLAIN authentication
-#
-# production:
-# delivery_method: :smtp
-# smtp_settings:
-# address: "example.com"
-# port: 25
-# authentication: :plain
-# domain: 'example.com'
-# user_name: 'myaccount'
-# password: 'password'
-#
-# === SMTP server at using TLS (GMail)
-#
-# This requires some additional configuration. See the article at:
-# http://redmineblog.com/articles/setup-redmine-to-send-email-using-gmail/
-#
-# production:
-# delivery_method: :smtp
-# smtp_settings:
-# tls: true
-# address: "smtp.gmail.com"
-# port: 587
-# domain: "smtp.gmail.com" # 'your.domain.com' for GoogleApps
-# authentication: :plain
-# user_name: "your_email@gmail.com"
-# password: "your_password"
-#
-#
-# == More configuration options
-#
-# See the "Configuration options" at the following website for a list of the
-# full options allowed:
-#
-# http://wiki.rubyonrails.org/rails/pages/HowToSendEmailsWithActionMailer
-
-production:
- delivery_method: :smtp
- smtp_settings:
- address: smtp.example.net
- port: 25
- domain: example.net
- authentication: :login
- user_name: "redmine@example.net"
- password: "redmine"
-
-development:
- delivery_method: :smtp
- smtp_settings:
- address: 127.0.0.1
- port: 25
- domain: example.net
- authentication: :login
- user_name: "redmine@example.net"
- password: "redmine"
# config.active_record.schema_format = :ruby
# Deliveries are disabled by default. Do NOT modify this section.
- # Define your email configuration in email.yml instead.
+ # Define your email configuration in configuration.yml instead.
# It will automatically turn deliveries on
config.action_mailer.perform_deliveries = false
+++ /dev/null
-# Loads action_mailer settings from email.yml
-# and turns deliveries on if configuration file is found
-
-filename = File.join(File.dirname(__FILE__), '..', 'email.yml')
-if File.file?(filename)
- mailconfig = YAML::load_file(filename)
-
- if mailconfig.is_a?(Hash) && mailconfig.has_key?(Rails.env)
- # Enable deliveries
- ActionMailer::Base.perform_deliveries = true
-
- mailconfig[Rails.env].each do |k, v|
- v.symbolize_keys! if v.respond_to?(:symbolize_keys!)
- ActionMailer::Base.send("#{k}=", v)
- end
- end
-end
label_generate_key: Генериране на ключ
setting_mail_handler_api_enabled: Разрешаване на WS за входящи e-mail-и
setting_mail_handler_api_key: API ключ
- text_email_delivery_not_configured: "Изпращането на e-mail-и не е конфигурирано и известията не са разрешени.\nКонфигурирайте вашия SMTP сървър в config/email.yml и рестартирайте Redmine, за да ги разрешите."
+ text_email_delivery_not_configured: "Изпращането на e-mail-и не е конфигурирано и известията не са разрешени.\nКонфигурирайте вашия SMTP сървър в config/configuration.yml и рестартирайте Redmine, за да ги разрешите."
field_parent_title: Родителска страница
label_issue_watchers: Наблюдатели
setting_commit_logs_encoding: Кодова таблица на съобщенията при поверяване
text_user_wrote: "%{value} je napisao/la:"
text_enumeration_destroy_question: "Za %{count} objekata je dodjeljenja ova vrijednost."
text_enumeration_category_reassign_to: 'Ponovo im dodjeli ovu vrijednost:'
- text_email_delivery_not_configured: "Email dostava nije konfiguraisana, notifikacija je onemogućena.\nKonfiguriši SMTP server u config/email.yml i restartuj aplikaciju nakon toga."
+ text_email_delivery_not_configured: "Email dostava nije konfiguraisana, notifikacija je onemogućena.\nKonfiguriši SMTP server u config/configuration.yml i restartuj aplikaciju nakon toga."
text_repository_usernames_mapping: "Odaberi ili ispravi redmine korisnika mapiranog za svako korisničko ima nađeno u logu repozitorija.\nKorisnici sa istim imenom u redmineu i u repozitoruju se automatski mapiraju."
text_diff_truncated: '... Ovaj prikaz razlike je odsječen pošto premašuje maksimalnu veličinu za prikaz'
text_custom_field_possible_values_info: 'Jedna linija za svaku vrijednost'
text_user_wrote: "%{value} va escriure:"
text_enumeration_destroy_question: "%{count} objectes estan assignats a aquest valor."
text_enumeration_category_reassign_to: "Torna a assignar-los a aquest valor:"
- text_email_delivery_not_configured: "El lliurament per correu electrònic no està configurat i les notificacions estan inhabilitades.\nConfigureu el servidor SMTP a config/email.yml i reinicieu l'aplicació per habilitar-lo."
+ text_email_delivery_not_configured: "El lliurament per correu electrònic no està configurat i les notificacions estan inhabilitades.\nConfigureu el servidor SMTP a config/configuration.yml i reinicieu l'aplicació per habilitar-lo."
text_repository_usernames_mapping: "Seleccioneu l'assignació entre els usuaris del Redmine i cada nom d'usuari trobat al dipòsit.\nEls usuaris amb el mateix nom d'usuari o correu del Redmine i del dipòsit s'assignaran automàticament."
text_diff_truncated: "... Aquestes diferències s'han trucat perquè excedeixen la mida màxima que es pot mostrar."
text_custom_field_possible_values_info: "Una línia per a cada valor"
label_generate_key: Generovat klíč
setting_mail_handler_api_enabled: Povolit WS pro příchozí e-maily
setting_mail_handler_api_key: API klíč
- text_email_delivery_not_configured: "Doručování e-mailů není nastaveno a odesílání notifikací je zakázáno.\nNastavte Váš SMTP server v souboru config/email.yml a restartujte aplikaci."
+ text_email_delivery_not_configured: "Doručování e-mailů není nastaveno a odesílání notifikací je zakázáno.\nNastavte Váš SMTP server v souboru config/configuration.yml a restartujte aplikaci."
field_parent_title: Rodičovská stránka
label_issue_watchers: Sledování
setting_commit_logs_encoding: Kódování zpráv při commitu
setting_sequential_project_identifiers: Generér sekventielle projekt-identifikatorer
setting_plain_text_mail: Emails som almindelig tekst (ingen HTML)
field_parent_title: Siden over
- text_email_delivery_not_configured: "Email-afsendelse er ikke indstillet og notifikationer er defor slået fra.\nKonfigurér din SMTP server i config/email.yml og genstart applikationen for at aktivere email-afsendelse."
+ text_email_delivery_not_configured: "Email-afsendelse er ikke indstillet og notifikationer er defor slået fra.\nKonfigurér din SMTP server i config/configuration.yml og genstart applikationen for at aktivere email-afsendelse."
permission_protect_wiki_pages: Beskyt wiki sider
permission_manage_documents: Administrér dokumenter
permission_add_issue_watchers: Tilføj overvågere
text_user_wrote: "%{value} schrieb:"
text_enumeration_destroy_question: "%{count} Objekt(e) sind diesem Wert zugeordnet."
text_enumeration_category_reassign_to: 'Die Objekte stattdessen diesem Wert zuordnen:'
- text_email_delivery_not_configured: "Der SMTP-Server ist nicht konfiguriert und Mailbenachrichtigungen sind ausgeschaltet.\nNehmen Sie die Einstellungen für Ihren SMTP-Server in config/email.yml vor und starten Sie die Applikation neu."
+ text_email_delivery_not_configured: "Der SMTP-Server ist nicht konfiguriert und Mailbenachrichtigungen sind ausgeschaltet.\nNehmen Sie die Einstellungen für Ihren SMTP-Server in config/configuration.yml vor und starten Sie die Applikation neu."
text_repository_usernames_mapping: "Bitte legen Sie die Zuordnung der Redmine-Benutzer zu den Benutzernamen der Commit-Log-Meldungen des Projektarchivs fest.\nBenutzer mit identischen Redmine- und Projektarchiv-Benutzernamen oder -E-Mail-Adressen werden automatisch zugeordnet."
text_diff_truncated: '... Dieser Diff wurde abgeschnitten, weil er die maximale Anzahl anzuzeigender Zeilen überschreitet.'
text_custom_field_possible_values_info: 'Eine Zeile pro Wert'
text_user_wrote: "%{value} έγραψε:"
text_enumeration_destroy_question: "%{count} αντικείμενα έχουν τεθεί σε αυτή την τιμή."
text_enumeration_category_reassign_to: 'Επανεκχώρηση τους στην παρούσα αξία:'
- text_email_delivery_not_configured: "Δεν έχουν γίνει ρυθμίσεις παράδοσης email, και οι ειδοποιήσεις είναι απενεργοποιημένες.\nΔηλώστε τον εξυπηρετητή SMTP στο config/email.yml και κάντε επανακκίνηση την εφαρμογή για να τις ρυθμίσεις."
+ text_email_delivery_not_configured: "Δεν έχουν γίνει ρυθμίσεις παράδοσης email, και οι ειδοποιήσεις είναι απενεργοποιημένες.\nΔηλώστε τον εξυπηρετητή SMTP στο config/configuration.yml και κάντε επανακκίνηση την εφαρμογή για να τις ρυθμίσεις."
text_repository_usernames_mapping: "Επιλέξτε ή ενημερώστε τον χρήστη Redmine που αντιστοιχεί σε κάθε όνομα χρήστη στο ιστορικό του αποθετηρίου.\nΧρήστες με το ίδιο όνομα χρήστη ή email στο Redmine και στο αποθετηρίο αντιστοιχίζονται αυτόματα."
text_diff_truncated: '... Αυτό το diff εχεί κοπεί επειδή υπερβαίνει το μέγιστο μέγεθος που μπορεί να προβληθεί.'
text_custom_field_possible_values_info: 'Μία γραμμή για κάθε τιμή'
text_user_wrote: "%{value} wrote:"\r
text_enumeration_destroy_question: "%{count} objects are assigned to this value."\r
text_enumeration_category_reassign_to: 'Reassign them to this value:'\r
- text_email_delivery_not_configured: "Email delivery is not configured, and notifications are disabled.\nConfigure your SMTP server in config/email.yml and restart the application to enable them."\r
+ text_email_delivery_not_configured: "Email delivery is not configured, and notifications are disabled.\nConfigure your SMTP server in config/configuration.yml and restart the application to enable them."\r
text_repository_usernames_mapping: "Select or update the Redmine user mapped to each username found in the repository log.\nUsers with the same Redmine and repository username or email are automatically mapped."\r
text_diff_truncated: '... This diff was truncated because it exceeds the maximum size that can be displayed.'\r
text_custom_field_possible_values_info: 'One line for each value'\r
text_user_wrote: "%{value} wrote:"
text_enumeration_destroy_question: "%{count} objects are assigned to this value."
text_enumeration_category_reassign_to: 'Reassign them to this value:'
- text_email_delivery_not_configured: "Email delivery is not configured, and notifications are disabled.\nConfigure your SMTP server in config/email.yml and restart the application to enable them."
+ text_email_delivery_not_configured: "Email delivery is not configured, and notifications are disabled.\nConfigure your SMTP server in config/configuration.yml and restart the application to enable them."
text_repository_usernames_mapping: "Select or update the Redmine user mapped to each username found in the repository log.\nUsers with the same Redmine and repository username or email are automatically mapped."
text_diff_truncated: '... This diff was truncated because it exceeds the maximum size that can be displayed.'
text_custom_field_possible_values_info: 'One line for each value'
text_destroy_time_entries: Borrar las horas
text_destroy_time_entries_question: Existen %{hours} horas asignadas a la petición que quiere borrar. ¿Qué quiere hacer?
text_diff_truncated: '... Diferencia truncada por exceder el máximo tamaño visualizable.'
- text_email_delivery_not_configured: "Las notificaciones están desactivadas porque el servidor de correo no está configurado.\nConfigure el servidor de SMTP en config/email.yml y reinicie la aplicación para activar los cambios."
+ text_email_delivery_not_configured: "Las notificaciones están desactivadas porque el servidor de correo no está configurado.\nConfigure el servidor de SMTP en config/configuration.yml y reinicie la aplicación para activar los cambios."
text_enumeration_category_reassign_to: 'Reasignar al siguiente valor:'
text_enumeration_destroy_question: "%{count} objetos con este valor asignado."
text_file_repository_writable: Se puede escribir en el repositorio
text_user_wrote: "%{value}-(e)k idatzi zuen:"\r
text_enumeration_destroy_question: "%{count} objetu balio honetara esleituta daude."\r
text_enumeration_category_reassign_to: 'Beste balio honetara esleitu:'\r
- text_email_delivery_not_configured: "Eposta bidalketa ez dago konfiguratuta eta jakinarazpenak ezgaituta daude.\nKonfiguratu zure SMTP zerbitzaria config/email.yml-n eta aplikazioa berrabiarazi hauek gaitzeko."\r
+ text_email_delivery_not_configured: "Eposta bidalketa ez dago konfiguratuta eta jakinarazpenak ezgaituta daude.\nKonfiguratu zure SMTP zerbitzaria config/configuration.yml-n eta aplikazioa berrabiarazi hauek gaitzeko."\r
text_repository_usernames_mapping: "Hautatu edo eguneratu Redmineko erabiltzailea biltegiko egunkarietan topatzen diren erabiltzaile izenekin erlazionatzeko.\nRedmine-n eta biltegian erabiltzaile izen edo eposta berdina duten erabiltzaileak automatikoki erlazionatzen dira."\r
text_diff_truncated: '... Diff hau moztua izan da erakus daitekeen tamaina maximoa gainditu duelako.'\r
text_custom_field_possible_values_info: 'Lerro bat balio bakoitzeko'\r
label_generate_key: Luo avain
setting_mail_handler_api_enabled: Ota käyttöön WS saapuville sähköposteille
setting_mail_handler_api_key: API avain
- text_email_delivery_not_configured: "Sähköpostin jakelu ei ole määritelty ja sähköpostimuistutukset eivät ole käytössä.\nKonfiguroi sähköpostipalvelinasetukset (SMTP) config/email.yml tiedostosta ja uudelleenkäynnistä sovellus jotta asetukset astuvat voimaan."
+ text_email_delivery_not_configured: "Sähköpostin jakelu ei ole määritelty ja sähköpostimuistutukset eivät ole käytössä.\nKonfiguroi sähköpostipalvelinasetukset (SMTP) config/configuration.yml tiedostosta ja uudelleenkäynnistä sovellus jotta asetukset astuvat voimaan."
field_parent_title: Aloitussivu
label_issue_watchers: Tapahtuman seuraajat
button_quote: Vastaa
text_user_wrote: "%{value} a écrit :"
text_enumeration_destroy_question: "Cette valeur est affectée à %{count} objets."
text_enumeration_category_reassign_to: 'Réaffecter les objets à cette valeur:'
- text_email_delivery_not_configured: "L'envoi de mail n'est pas configuré, les notifications sont désactivées.\nConfigurez votre serveur SMTP dans config/email.yml et redémarrez l'application pour les activer."
+ text_email_delivery_not_configured: "L'envoi de mail n'est pas configuré, les notifications sont désactivées.\nConfigurez votre serveur SMTP dans config/configuration.yml et redémarrez l'application pour les activer."
text_repository_usernames_mapping: "Vous pouvez sélectionner ou modifier l'utilisateur Redmine associé à chaque nom d'utilisateur figurant dans l'historique du dépôt.\nLes utilisateurs avec le même identifiant ou la même adresse mail seront automatiquement associés."
text_diff_truncated: '... Ce différentiel a été tronqué car il excède la taille maximale pouvant être affichée.'
text_custom_field_possible_values_info: 'Une ligne par valeur'
text_destroy_time_entries: Borrar as horas
text_destroy_time_entries_question: Existen %{hours} horas asignadas á petición que quere borrar. ¿Que quere facer ?
text_diff_truncated: '... Diferencia truncada por exceder o máximo tamaño visualizable.'
- text_email_delivery_not_configured: "O envío de correos non está configurado, e as notificacións desactiváronse. \n Configure o servidor de SMTP en config/email.yml e reinicie a aplicación para activar os cambios."
+ text_email_delivery_not_configured: "O envío de correos non está configurado, e as notificacións desactiváronse. \n Configure o servidor de SMTP en config/configuration.yml e reinicie a aplicación para activar os cambios."
text_enumeration_category_reassign_to: 'Reasignar ó seguinte valor:'
text_enumeration_destroy_question: "%{count} obxectos con este valor asignado."
text_file_repository_writable: Pódese escribir no repositorio
text_user_wrote: "%{value} כתב:"
text_enumeration_destroy_question: "%{count} אוביקטים מוצבים לערך זה."
text_enumeration_category_reassign_to: 'הצב מחדש לערך הזה:'
- text_email_delivery_not_configured: 'לא נקבעה תצורה לשליחת דואר, וההתראות כבויות.\nקבע את תצורת שרת ה־SMTP בקובץ /etc/redmine/<instance>/email.yml והתחל את האפליקציה מחדש ע"מ לאפשר אותם.'
+ text_email_delivery_not_configured: 'לא נקבעה תצורה לשליחת דואר, וההתראות כבויות.\nקבע את תצורת שרת ה־SMTP בקובץ /etc/redmine/<instance>/configuration.yml והתחל את האפליקציה מחדש ע"מ לאפשר אותם.'
text_repository_usernames_mapping: "בחר או עדכן את משתמש Redmine הממופה לכל שם משתמש ביומן המאגר.\nמשתמשים בעלי שם או כתובת דואר זהה ב־Redmine ובמאגר ממופים באופן אוטומטי."
text_diff_truncated: '... השינויים עוברים את מספר השורות המירבי לתצוגה, ולכן הם קוצצו.'
text_custom_field_possible_values_info: שורה אחת לכל ערך
text_user_wrote: "%{value} je napisao/la:"
text_enumeration_destroy_question: "%{count} objekata je pridruženo toj vrijednosti."
text_enumeration_category_reassign_to: 'Premjesti ih ovoj vrijednosti:'
- text_email_delivery_not_configured: "Email delivery is not configured, and notifications are disabled.\nConfigure your SMTP server in config/email.yml and restart the application to enable them."
+ text_email_delivery_not_configured: "Email delivery is not configured, and notifications are disabled.\nConfigure your SMTP server in config/configuration.yml and restart the application to enable them."
text_repository_usernames_mapping: "Select or update the Redmine user mapped to each username found in the repository log.\nUsers with the same Redmine and repository username or email are automatically mapped."
text_diff_truncated: '... Ovaj diff je odrezan zato što prelazi maksimalnu veličinu koja može biti prikazana.'
text_custom_field_possible_values_info: 'One line for each value'
label_generate_key: Kulcs generálása
setting_mail_handler_api_enabled: Web Service engedélyezése a beérkezett levelekhez
setting_mail_handler_api_key: API kulcs
- text_email_delivery_not_configured: "Az E-mail küldés nincs konfigurálva, és az értesítések ki vannak kapcsolva.\nÁllítsd be az SMTP szervert a config/email.yml fájlban és indítsd újra az alkalmazást, hogy érvénybe lépjen."
+ text_email_delivery_not_configured: "Az E-mail küldés nincs konfigurálva, és az értesítések ki vannak kapcsolva.\nÁllítsd be az SMTP szervert a config/configuration.yml fájlban és indítsd újra az alkalmazást, hogy érvénybe lépjen."
field_parent_title: Szülő oldal
label_issue_watchers: Megfigyelők
setting_commit_logs_encoding: Commit üzenetek kódlapja
text_user_wrote: "%{value} menulis:"
text_enumeration_destroy_question: "%{count} obyek ditugaskan untuk nilai ini."
text_enumeration_category_reassign_to: 'Tugaskan kembali untuk nilai ini:'
- text_email_delivery_not_configured: "Pengiriman email belum dikonfigurasi, notifikasi tidak diaktifkan.\nAnda harus mengkonfigur SMTP server anda pada config/email.yml dan restart kembali aplikasi untuk mengaktifkan."
+ text_email_delivery_not_configured: "Pengiriman email belum dikonfigurasi, notifikasi tidak diaktifkan.\nAnda harus mengkonfigur SMTP server anda pada config/configuration.yml dan restart kembali aplikasi untuk mengaktifkan."
text_repository_usernames_mapping: "Pilih atau perbarui pengguna Redmine yang terpetakan ke setiap nama pengguna yang ditemukan di log repositori.\nPengguna dengan nama pengguna dan repositori atau email yang sama secara otomasit akan dipetakan."
text_diff_truncated: '... Perbedaan terpotong karena melebihi batas maksimum yang bisa ditampilkan.'
text_custom_field_possible_values_info: 'Satu baris untuk setiap nilai'
label_generate_key: Genera una chiave
setting_mail_handler_api_enabled: Abilita WS per le email in arrivo
setting_mail_handler_api_key: Chiave API
- text_email_delivery_not_configured: "La consegna via email non è configurata e le notifiche sono disabilitate.\nConfigura il tuo server SMTP in config/email.yml e riavvia l'applicazione per abilitarle."
+ text_email_delivery_not_configured: "La consegna via email non è configurata e le notifiche sono disabilitate.\nConfigura il tuo server SMTP in config/configuration.yml e riavvia l'applicazione per abilitarle."
field_parent_title: Pagina principale
label_issue_watchers: Osservatori
setting_commit_logs_encoding: Codifica dei messaggi di commit
text_user_wrote: "%{value} は書きました:"
text_enumeration_destroy_question: "%{count}個のオブジェクトがこの値に割り当てられています。"
text_enumeration_category_reassign_to: '次の値に割り当て直す:'
- text_email_delivery_not_configured: "メールを送信するために必要な設定が行われていないため、メール通知は利用できません。\nconfig/email.ymlでSMTPサーバの設定を行い、アプリケーションを再起動してください。"
+ text_email_delivery_not_configured: "メールを送信するために必要な設定が行われていないため、メール通知は利用できません。\nconfig/configuration.ymlでSMTPサーバの設定を行い、アプリケーションを再起動してください。"
text_repository_usernames_mapping: "リポジトリのログから検出されたユーザー名をどのRedmineユーザーに関連づけるのか選択してください。\nログ上のユーザー名またはメールアドレスがRedmineのユーザーと一致する場合は自動的に関連づけられます。"
text_diff_truncated: '... 差分の行数が表示可能な上限を超えました。超過分は表示しません。'
text_custom_field_possible_values_info: '選択肢の値は1行に1個ずつ記述してください。'
text_user_wrote: "%{value}의 덧글:"
text_enumeration_category_reassign_to: '새로운 값을 설정:'
text_enumeration_destroy_question: "%{count} 개의 일감이 이 값을 사용하고 있습니다."
- text_email_delivery_not_configured: "이메일 전달이 설정되지 않았습니다. 그래서 알림이 비활성화되었습니다.\n SMTP서버를 config/email.yml에서 설정하고 어플리케이션을 다시 시작하십시오. 그러면 동작합니다."
+ text_email_delivery_not_configured: "이메일 전달이 설정되지 않았습니다. 그래서 알림이 비활성화되었습니다.\n SMTP서버를 config/configuration.yml에서 설정하고 어플리케이션을 다시 시작하십시오. 그러면 동작합니다."
text_repository_usernames_mapping: "저장소 로그에서 발견된 각 사용자에 레드마인 사용자를 업데이트할때 선택합니다.\n레드마인과 저장소의 이름이나 이메일이 같은 사용자가 자동으로 연결됩니다."
text_diff_truncated: '... 이 차이점은 표시할 수 있는 최대 줄수를 초과해서 이 차이점은 잘렸습니다.'
text_custom_field_possible_values_info: '각 값 당 한 줄'
text_user_wrote: "%{value} parašė:"
text_enumeration_destroy_question: "%{count} objektai priskirti šiai reikšmei."
text_enumeration_category_reassign_to: 'Priskirti juos šiai reikšmei:'
- text_email_delivery_not_configured: "El.pašto siuntimas nesukonfigūruotas, ir perspėjimai neaktyvus.\nSukonfigūruokite savo SMTP serverį byloje config/email.yml ir perleiskite programą norėdami pritaikyti pakeitimus."
+ text_email_delivery_not_configured: "El.pašto siuntimas nesukonfigūruotas, ir perspėjimai neaktyvus.\nSukonfigūruokite savo SMTP serverį byloje config/configuration.yml ir perleiskite programą norėdami pritaikyti pakeitimus."
text_repository_usernames_mapping: "Parinkite ar atnaujinkite Redmine vartotojo vardą kiekvienam saugyklos vardui, kuris paminėtas saugyklos log'e.\nVartotojai, turintys tą patį Redmine ir saugyklos vardą ar el.paštą automatiškai surišti."
text_diff_truncated: "... Šis diff'as nukarpytas, nes jis viršijo maksimalų rodomą eilučių skaičių."
text_custom_field_possible_values_info: 'Po vieną eilutę kiekvienai reikšmei'
text_user_wrote: "%{value} rakstīja:"\r
text_enumeration_destroy_question: "%{count} objekti ir piešķirti šai vērtībai."\r
text_enumeration_category_reassign_to: 'Piešķirt tos šai vērtībai:'\r
- text_email_delivery_not_configured: "E-pastu nosūtīšana nav konfigurēta, un ziņojumi ir izslēgti.\nKonfigurējiet savu SMTP serveri datnē config/email.yml un pārstartējiet lietotni."\r
+ text_email_delivery_not_configured: "E-pastu nosūtīšana nav konfigurēta, un ziņojumi ir izslēgti.\nKonfigurējiet savu SMTP serveri datnē config/configuration.yml un pārstartējiet lietotni."\r
text_repository_usernames_mapping: "Izvēlieties vai atjaunojiet Redmine lietotāju, saistītu ar katru lietotājvārdu, kas atrodams repozitorija žurnālā.\nLietotāji ar to pašu Redmine un repozitorija lietotājvārdu būs saistīti automātiski."\r
text_diff_truncated: '... Šis diff tika nošķelts, jo tas pārsniedz maksimālo izmēru, ko var parādīt.'\r
text_custom_field_possible_values_info: 'Katra vērtības savā rindā'\r
text_user_wrote: "%{value} напиша:"\r
text_enumeration_destroy_question: "%{count} objects are assigned to this value."\r
text_enumeration_category_reassign_to: 'Reassign them to this value:'\r
- text_email_delivery_not_configured: "Доставата по е-пошта не е конфигурирана, и известувањата се оневозможени.\nКонфигурирајте го Вашиот SMTP сервер во config/email.yml и рестартирајте ја апликацијата."\r
+ text_email_delivery_not_configured: "Доставата по е-пошта не е конфигурирана, и известувањата се оневозможени.\nКонфигурирајте го Вашиот SMTP сервер во config/configuration.yml и рестартирајте ја апликацијата."\r
text_repository_usernames_mapping: "Select or update the Redmine user mapped to each username found in the repository log.\nUsers with the same Redmine and repository username or email are automatically mapped."\r
text_diff_truncated: '... This diff was truncated because it exceeds the maximum size that can be displayed.'\r
text_custom_field_possible_values_info: 'One line for each value'\r
text_user_wrote: "%{value} бичихдээ:"\r
text_enumeration_destroy_question: "Энэ утгад %{count} обьект оноогдсон байна."\r
text_enumeration_category_reassign_to: 'Тэдгээрийг энэ утгад дахин оноо:'\r
- text_email_delivery_not_configured: "Имэйлийн тохиргоог хараахан тохируулаагүй байна, тиймээс имэйл мэдэгдэл явуулах боломжгүй байна.\nSMTP сервэрээ config/email.yml файл дотор тохируулаад төслийн менежерээ дахиад эхлүүлээрэй."\r
+ text_email_delivery_not_configured: "Имэйлийн тохиргоог хараахан тохируулаагүй байна, тиймээс имэйл мэдэгдэл явуулах боломжгүй байна.\nSMTP сервэрээ config/configuration.yml файл дотор тохируулаад төслийн менежерээ дахиад эхлүүлээрэй."\r
text_repository_usernames_mapping: "Репозиторийн логд байгаа бүх хэрэглэгчийн нэрүүдэд харгалзсан Төслийн Менежер системд бүртгэлтэй хэрэглэгчдийг Сонгох юмуу шинэчилнэ үү.\nТөслийн менежер болон репозиторид байгаа ижилхэн нэр юмуу имэйлтэй хэрэглэгчид харилцан харгалзна."\r
text_diff_truncated: '... Файлын ялгаврын хэмжээ үзүүлэхэд дэндүү урт байгаа учраас төгсгөлөөс нь хасч үзүүлэв.'\r
text_custom_field_possible_values_info: 'One line for each value'\r
text_destroy_time_entries: Verwijder gerapporteerde uren
text_destroy_time_entries_question: "%{hours} uren werden gerapporteerd op de issue(s) die u wilde verwijderen. Wat wil u doen?"
text_diff_truncated: '... Deze diff werd afgekort omdat het de maximale weer te geven karakters overschreed.'
- text_email_delivery_not_configured: "E-mailbezorging is niet geconfigureerd. Notificaties zijn uitgeschakeld.\nConfigureer uw SMTP server in config/email.yml en herstart de applicatie om dit te activeren."
+ text_email_delivery_not_configured: "E-mailbezorging is niet geconfigureerd. Notificaties zijn uitgeschakeld.\nConfigureer uw SMTP server in config/configuration.yml en herstart de applicatie om dit te activeren."
text_enumeration_category_reassign_to: 'Wijs de volgende waarde toe:'
text_enumeration_destroy_question: "%{count} objecten zijn toegewezen aan deze waarde."
text_file_repository_writable: Bestandsrepository beschrijfbaar
label_generate_key: Generer en nøkkel
setting_mail_handler_api_enabled: Skru på WS for innkommende e-post
setting_mail_handler_api_key: API-nøkkel
- text_email_delivery_not_configured: "Levering av e-post er ikke satt opp, og varsler er skrudd av.\nStill inn din SMTP-tjener i config/email.yml og start programmet på nytt for å skru det på."
+ text_email_delivery_not_configured: "Levering av e-post er ikke satt opp, og varsler er skrudd av.\nStill inn din SMTP-tjener i config/configuration.yml og start programmet på nytt for å skru det på."
field_parent_title: Foreldreside
label_issue_watchers: Overvåkere
setting_commit_logs_encoding: Tegnkoding for innsendingsmeldinger
text_default_administrator_account_changed: Zmieniono domyślne hasło administratora
text_destroy_time_entries: Usuń wpisy dziennika
text_destroy_time_entries_question: Przepracowano %{hours} godzin przy zagadnieniu, które chcesz usunąć. Co chcesz zrobić?
- text_email_delivery_not_configured: "Dostarczanie poczty elektronicznej nie zostało skonfigurowane, więc powiadamianie jest nieaktywne.\nSkonfiguruj serwer SMTP w config/email.yml a następnie zrestartuj aplikację i uaktywnij to."
+ text_email_delivery_not_configured: "Dostarczanie poczty elektronicznej nie zostało skonfigurowane, więc powiadamianie jest nieaktywne.\nSkonfiguruj serwer SMTP w config/configuration.yml a następnie zrestartuj aplikację i uaktywnij to."
text_enumeration_category_reassign_to: 'Zmień przypisanie na tą wartość:'
text_enumeration_destroy_question: "%{count} obiektów jest przypisana do tej wartości."
text_file_repository_writable: Zapisywalne repozytorium plików
text_user_wrote: "%{value} escreveu:"
text_enumeration_destroy_question: "%{count} objetos estão atribuídos a este valor."
text_enumeration_category_reassign_to: 'Reatribuí-los ao valor:'
- text_email_delivery_not_configured: "O envio de e-mail não está configurado, e as notificações estão inativas.\nConfigure seu servidor SMTP no arquivo config/email.yml e reinicie a aplicação para ativá-las."
+ text_email_delivery_not_configured: "O envio de e-mail não está configurado, e as notificações estão inativas.\nConfigure seu servidor SMTP no arquivo config/configuration.yml e reinicie a aplicação para ativá-las."
default_role_manager: Gerente
default_role_developer: Desenvolvedor
text_user_wrote: "%{value} escreveu:"
text_enumeration_destroy_question: "%{count} objectos estão atribuídos a este valor."
text_enumeration_category_reassign_to: 'Re-atribuí-los para este valor:'
- text_email_delivery_not_configured: "Entrega por e-mail não está configurada, e as notificação estão desactivadas.\nConfigure o seu servidor de SMTP em config/email.yml e reinicie a aplicação para activar estas funcionalidades."
+ text_email_delivery_not_configured: "Entrega por e-mail não está configurada, e as notificação estão desactivadas.\nConfigure o seu servidor de SMTP em config/configuration.yml e reinicie a aplicação para activar estas funcionalidades."
default_role_manager: Gestor
default_role_developer: Programador
text_user_wrote: "%{value} a scris:"
text_enumeration_destroy_question: "Această valoare are %{count} obiecte."
text_enumeration_category_reassign_to: 'Atribuie la această valoare:'
- text_email_delivery_not_configured: "Trimiterea de emailuri nu este configurată și ca urmare, notificările sunt dezactivate.\nConfigurați serverul SMTP în config/email.yml și reporniți aplicația pentru a le activa."
+ text_email_delivery_not_configured: "Trimiterea de emailuri nu este configurată și ca urmare, notificările sunt dezactivate.\nConfigurați serverul SMTP în config/configuration.yml și reporniți aplicația pentru a le activa."
text_repository_usernames_mapping: "Selectați sau modificați contul Redmine echivalent contului din istoricul depozitului.\nUtilizatorii cu un cont (sau e-mail) identic în Redmine și depozit sunt echivalate automat."
text_diff_truncated: '... Comparația a fost trunchiată pentru ca depășește lungimea maximă de text care poate fi afișat.'
text_custom_field_possible_values_info: 'O linie pentru fiecare valoare'
text_destroy_time_entries_question: Вы собираетесь удалить %{hours} часа(ов), прикрепленных за этой задачей.
text_destroy_time_entries: Удалить зарегистрированное время
text_diff_truncated: '... Этот diff ограничен, так как превышает максимальный отображаемый размер.'
- text_email_delivery_not_configured: "Параметры работы с почтовым сервером не настроены и функция уведомления по email не активна.\nНастроить параметры для Вашего SMTP-сервера Вы можете в файле config/email.yml. Для применения изменений перезапустите приложение."
+ text_email_delivery_not_configured: "Параметры работы с почтовым сервером не настроены и функция уведомления по email не активна.\nНастроить параметры для Вашего SMTP-сервера Вы можете в файле config/configuration.yml. Для применения изменений перезапустите приложение."
text_enumeration_category_reassign_to: 'Назначить им следующее значение:'
text_enumeration_destroy_question: "%{count} объект(а,ов) связаны с этим значением."
text_file_repository_writable: Хранилище с доступом на запись
label_generate_key: Vygenerovať kľúč
setting_mail_handler_api_enabled: Zapnúť Webovú Službu (WS) pre príchodzie emaily
setting_mail_handler_api_key: API kľúč
- text_email_delivery_not_configured: "Doručenie emailov nieje nastavené, notifikácie sú vypnuté.\nNastavte váš SMTP server v config/email.yml a reštartnite aplikáciu pre aktiváciu funkcie."
+ text_email_delivery_not_configured: "Doručenie emailov nieje nastavené, notifikácie sú vypnuté.\nNastavte váš SMTP server v config/configuration.yml a reštartnite aplikáciu pre aktiváciu funkcie."
field_parent_title: Nadradená stránka
label_issue_watchers: Pozorovatelia
setting_commit_logs_encoding: Kódovanie prenášaných správ
text_user_wrote: "%{value} je napisal(a):"
text_enumeration_destroy_question: "%{count} objektov je določenih tej vrednosti."
text_enumeration_category_reassign_to: 'Ponastavi jih na to vrednost:'
- text_email_delivery_not_configured: "E-poštna dostava ni nastavljena in oznanila so onemogočena.\nNastavite vaš SMTP strežnik v config/email.yml in ponovno zaženite aplikacijo da ga omogočite.\n"
+ text_email_delivery_not_configured: "E-poštna dostava ni nastavljena in oznanila so onemogočena.\nNastavite vaš SMTP strežnik v config/configuration.yml in ponovno zaženite aplikacijo da ga omogočite.\n"
text_repository_usernames_mapping: "Izberite ali posodobite Redmine uporabnika dodeljenega vsakemu uporabniškemu imenu najdenemu v zapisniku shrambe.\n Uporabniki z enakim Redmine ali shrambinem uporabniškem imenu ali e-poštnem naslovu so samodejno dodeljeni."
text_diff_truncated: '... Ta sprememba je bila odsekana ker presega največjo velikost ki je lahko prikazana.'
text_user_wrote: "%{value} je napisao:"\r
text_enumeration_destroy_question: "%{count} objekat(a) je dodeljeno ovoj vrednosti."\r
text_enumeration_category_reassign_to: 'Dodeli ih ponovo ovoj vrednosti:'\r
- text_email_delivery_not_configured: "Isporuka e-poruka nije konfigurisana i obaveštenja su onemogućena.\nPodesite vaš SMTP server u config/email.yml i pokrenite ponovo aplikaciju za njihovo omogućavanje."\r
+ text_email_delivery_not_configured: "Isporuka e-poruka nije konfigurisana i obaveštenja su onemogućena.\nPodesite vaš SMTP server u config/configuration.yml i pokrenite ponovo aplikaciju za njihovo omogućavanje."\r
text_repository_usernames_mapping: "Odaberite ili ažurirajte Redmine korisnike mapiranjem svakog korisničkog imena pronađenog u evidenciji spremišta.\nKorisnici sa istim Redmine imenom i imenom spremišta ili e-adresom su automatski mapirani."\r
text_diff_truncated: '... Ova razlika je isečena jer je dostignuta maksimalna veličina prikaza.'\r
text_custom_field_possible_values_info: 'Jedan red za svaku vrednost'\r
text_user_wrote: "%{value} је написао:"
text_enumeration_destroy_question: "%{count} објекат(а) је додељено овој вредности."
text_enumeration_category_reassign_to: 'Додели их поново овој вредности:'
- text_email_delivery_not_configured: "Испорука е-порука није конфигурисана и обавештења су онемогућена.\nПодесите ваш SMTP сервер у config/email.yml и покрените поново апликацију за њихово омогућавање."
+ text_email_delivery_not_configured: "Испорука е-порука није конфигурисана и обавештења су онемогућена.\nПодесите ваш SMTP сервер у config/configuration.yml и покрените поново апликацију за њихово омогућавање."
text_repository_usernames_mapping: "Одаберите или ажурирајте Redmine кориснике мапирањем сваког корисничког имена пронађеног у евиденцији спремишта.\nКорисници са истим Redmine именом и именом спремишта или е-адресом су аутоматски мапирани."
text_diff_truncated: '... Ова разлика је исечена јер је достигнута максимална величина приказа.'
text_custom_field_possible_values_info: 'Један ред за сваку вредност'
text_user_wrote: "%{value} skrev:"
text_enumeration_destroy_question: "%{count} objekt är tilldelade till detta värde."
text_enumeration_category_reassign_to: 'Återtilldela till detta värde:'
- text_email_delivery_not_configured: "Mailfunktionen har inte konfigurerats, och notifieringar via mail kan därför inte skickas.\nKonfigurera din SMTP-server i config/email.yml och starta om applikationen för att aktivera dem."
+ text_email_delivery_not_configured: "Mailfunktionen har inte konfigurerats, och notifieringar via mail kan därför inte skickas.\nKonfigurera din SMTP-server i config/configuration.yml och starta om applikationen för att aktivera dem."
text_repository_usernames_mapping: "Välj eller uppdatera den Redmine-användare som är mappad till varje användarnamn i versionarkivloggen.\nAnvändare med samma användarnamn eller mailadress i både Redmine och versionsarkivet mappas automatiskt."
text_diff_truncated: '... Denna diff har förminskats eftersom den överskrider den maximala storlek som kan visas.'
text_custom_field_possible_values_info: 'Ett värde per rad'
label_generate_key: Generate a key
setting_mail_handler_api_enabled: Enable WS for incoming emails
setting_mail_handler_api_key: API key
- text_email_delivery_not_configured: "Email delivery is not configured, and notifications are disabled.\nConfigure your SMTP server in config/email.yml and restart the application to enable them."
+ text_email_delivery_not_configured: "Email delivery is not configured, and notifications are disabled.\nConfigure your SMTP server in config/configuration.yml and restart the application to enable them."
field_parent_title: Parent page
label_issue_watchers: Watchers
setting_commit_logs_encoding: Commit messages encoding
label_generate_key: Generate a key
setting_sequential_project_identifiers: Generate sequential project identifiers
field_parent_title: Parent page
- text_email_delivery_not_configured: "Email delivery is not configured, and notifications are disabled.\nConfigure your SMTP server in config/email.yml and restart the application to enable them."
+ text_email_delivery_not_configured: "Email delivery is not configured, and notifications are disabled.\nConfigure your SMTP server in config/configuration.yml and restart the application to enable them."
text_enumeration_category_reassign_to: 'Reassign them to this value:'
label_issue_watchers: Watchers
mail_body_reminder: "%{count} issue(s) that are assigned to you are due in the next %{days} days:"
label_generate_key: Generate a key
setting_mail_handler_api_enabled: Enable WS for incoming emails
setting_mail_handler_api_key: API key
- text_email_delivery_not_configured: "Email delivery is not configured, and notifications are disabled.\nConfigure your SMTP server in config/email.yml and restart the application to enable them."
+ text_email_delivery_not_configured: "Email delivery is not configured, and notifications are disabled.\nConfigure your SMTP server in config/configuration.yml and restart the application to enable them."
field_parent_title: Parent page
label_issue_watchers: Watchers
setting_commit_logs_encoding: Commit messages encoding
text_user_wrote: "%{value} wrote:"
text_enumeration_destroy_question: "%{count} objects are assigned to this value."
text_enumeration_category_reassign_to: 'Reassign them to this value:'
- text_email_delivery_not_configured: "Email delivery is not configured, and notifications are disabled.\nConfigure your SMTP server in config/email.yml and restart the application to enable them."
+ text_email_delivery_not_configured: "Email delivery is not configured, and notifications are disabled.\nConfigure your SMTP server in config/configuration.yml and restart the application to enable them."
default_role_manager: Điều hành
default_role_developer: Phát triển
text_user_wrote: "%{value} 先前提到:"
text_enumeration_destroy_question: "目前有 %{count} 個物件使用此列舉值。"
text_enumeration_category_reassign_to: '重新設定其列舉值為:'
- text_email_delivery_not_configured: "您尚未設定電子郵件傳送方式,因此提醒選項已被停用。\n請在 config/email.yml 中設定 SMTP 之後,重新啟動 Redmine,以啟用電子郵件提醒選項。"
+ text_email_delivery_not_configured: "您尚未設定電子郵件傳送方式,因此提醒選項已被停用。\n請在 config/configuration.yml 中設定 SMTP 之後,重新啟動 Redmine,以啟用電子郵件提醒選項。"
text_repository_usernames_mapping: "選擇或更新 Redmine 使用者與版本庫使用者之對應關係。\n版本庫中之使用者帳號或電子郵件信箱,與 Redmine 設定相同者,將自動產生對應關係。"
text_diff_truncated: '... 這份差異已被截短以符合顯示行數之最大值'
text_custom_field_possible_values_info: '一列輸入一個值'
text_user_wrote: "%{value} 写到:"
text_enumeration_category_reassign_to: '将它们关联到新的枚举值:'
text_enumeration_destroy_question: "%{count} 个对象被关联到了这个枚举值。"
- text_email_delivery_not_configured: "邮件参数尚未配置,因此邮件通知功能已被禁用。\n请在config/email.yml中配置您的SMTP服务器信息并重新启动以使其生效。"
+ text_email_delivery_not_configured: "邮件参数尚未配置,因此邮件通知功能已被禁用。\n请在config/configuration.yml中配置您的SMTP服务器信息并重新启动以使其生效。"
text_repository_usernames_mapping: "选择或更新与版本库中的用户名对应的Redmine用户。\n版本库中与Redmine中的同名用户将被自动对应。"
text_diff_truncated: '... 差别内容超过了可显示的最大行数并已被截断'
text_custom_field_possible_values_info: '每项数值一行'
== SMTP server Configuration
-Copy config/email.yml.example to config/email.yml and edit this file
-to adjust your SMTP settings.
+Copy config/configuration.yml.example to config/configuration.yml and
+edit this file to adjust your SMTP settings.
Do not forget to restart the application after any change to this file.
Please do not enter your SMTP settings in environment.rb.
1. Uncompress the program archive in a new directory
2. Copy your database settings (RAILS_ROOT/config/database.yml)
- and SMTP settings (RAILS_ROOT/config/email.yml) into the new
- config directory
+ and your configuration file (RAILS_ROOT/config/configuration.yml)
+ into the new config directory
+ Note: before Redmine 1.2, SMTP configuration was stored in
+ config/email.yml. It should now be stored in config/configuration.yml.
3. Copy the RAILS_ROOT/files directory content into your new installation
This directory contains all the attached files.
--- /dev/null
+# Redmine - project management software
+# Copyright (C) 2006-2011 Jean-Philippe Lang
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+module Redmine
+ module Configuration
+
+ # Configuration default values
+ @defaults = {
+ 'email_delivery' => nil
+ }
+
+ @config = nil
+
+ class << self
+ # Loads the Redmine configuration file
+ # Valid options:
+ # * <tt>:file</tt>: the configuration file to load (default: config/configuration.yml)
+ # * <tt>:env</tt>: the environment to load the configuration for (default: Rails.env)
+ def load(options={})
+ filename = options[:file] || File.join(Rails.root, 'config', 'configuration.yml')
+ env = options[:env] || Rails.env
+
+ @config = @defaults.dup
+
+ load_deprecated_email_configuration(env)
+ if File.file?(filename)
+ @config.merge!(load_from_yaml(filename, env))
+ end
+
+ # Compatibility mode for those who copy email.yml over configuration.yml
+ %w(delivery_method smtp_settings sendmail_settings).each do |key|
+ if value = @config.delete(key)
+ @config['email_delivery'] ||= {}
+ @config['email_delivery'][key] = value
+ end
+ end
+
+ if @config['email_delivery']
+ ActionMailer::Base.perform_deliveries = true
+ @config['email_delivery'].each do |k, v|
+ v.symbolize_keys! if v.respond_to?(:symbolize_keys!)
+ ActionMailer::Base.send("#{k}=", v)
+ end
+ end
+
+ @config
+ end
+
+ # Returns a configuration setting
+ def [](name)
+ load unless @config
+ @config[name]
+ end
+
+ private
+
+ def load_from_yaml(filename, env)
+ yaml = YAML::load_file(filename)
+ conf = {}
+ if yaml.is_a?(Hash)
+ if yaml['default']
+ conf.merge!(yaml['default'])
+ end
+ if yaml[env]
+ conf.merge!(yaml[env])
+ end
+ else
+ $stderr.puts "#{filename} is not a valid Redmine configuration file"
+ exit 1
+ end
+ conf
+ end
+
+ def load_deprecated_email_configuration(env)
+ deprecated_email_conf = File.join(Rails.root, 'config', 'email.yml')
+ if File.file?(deprecated_email_conf)
+ warn "Storing outgoing emails configuration in config/email.yml is deprecated. You should now store it in config/configuration.yml using the email_delivery setting."
+ @config.merge!({'email_delivery' => load_from_yaml(deprecated_email_conf, env)})
+ end
+ end
+ end
+ end
+end
--- /dev/null
+default:
+ somesetting: foo
+
+production:
+
+development:
+
+test:
--- /dev/null
+default:
+
+production:
+
+development:
+
+test:
--- /dev/null
+default:
+
+production:
+
+development:
+
+test:
+ somesetting: foo
--- /dev/null
+default:
+ somesetting: foo
+
+production:
+
+development:
+
+test:
+ somesetting: bar
--- /dev/null
+# Redmine - project management software
+# Copyright (C) 2006-2011 Jean-Philippe Lang
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+require File.expand_path('../../../../test_helper', __FILE__)
+
+class Redmine::ConfigurationTest < ActiveSupport::TestCase
+ def setup
+ @conf = Redmine::Configuration
+ end
+
+ def test_empty
+ assert_kind_of Hash, load_conf('empty.yml', 'test')
+ end
+
+ def test_default
+ assert_kind_of Hash, load_conf('default.yml', 'test')
+ assert_equal 'foo', @conf['somesetting']
+ end
+
+ def test_no_default
+ assert_kind_of Hash, load_conf('no_default.yml', 'test')
+ assert_equal 'foo', @conf['somesetting']
+ end
+
+ def test_overrides
+ assert_kind_of Hash, load_conf('overrides.yml', 'test')
+ assert_equal 'bar', @conf['somesetting']
+ end
+
+ private
+
+ def load_conf(file, env)
+ @conf.load(
+ :file => File.join(Rails.root, 'test', 'fixtures', 'configuration', file),
+ :env => env
+ )
+ end
+end