From 3358ea227e5e769e5e15deb5fe4173b93d02a3e8 Mon Sep 17 00:00:00 2001 From: Alex Coelho Date: Thu, 1 Jun 2017 12:33:52 -0300 Subject: [PATCH 1/3] Portuguese adapted in app.*.pt.yml files --- config/application.yml.default | 69 ------------------- config/database.yml.default | 39 ----------- .../{app.admin.pt-BR.yml => app.admin.pt.yml} | 2 +- ...app.logged.pt-BR.yml => app.logged.pt.yml} | 2 +- ...app.public.pt-BR.yml => app.public.pt.yml} | 4 +- ...app.shared.pt-BR.yml => app.shared.pt.yml} | 2 +- .../{devise.pt-BR.yml => devise.pt.yml} | 2 +- .../locales/{mails.pt-BR.yml => mails.pt.yml} | 2 +- config/locales/{pt-BR.yml => pt.yml} | 2 +- ...r-translate-interpolation-messageformat.js | 1 - 10 files changed, 8 insertions(+), 117 deletions(-) delete mode 100644 config/application.yml.default delete mode 100644 config/database.yml.default rename config/locales/{app.admin.pt-BR.yml => app.admin.pt.yml} (99%) rename config/locales/{app.logged.pt-BR.yml => app.logged.pt.yml} (99%) rename config/locales/{app.public.pt-BR.yml => app.public.pt.yml} (98%) rename config/locales/{app.shared.pt-BR.yml => app.shared.pt.yml} (99%) rename config/locales/{devise.pt-BR.yml => devise.pt.yml} (99%) rename config/locales/{mails.pt-BR.yml => mails.pt.yml} (99%) rename config/locales/{pt-BR.yml => pt.yml} (99%) diff --git a/config/application.yml.default b/config/application.yml.default deleted file mode 100644 index ab2e0b224..000000000 --- a/config/application.yml.default +++ /dev/null @@ -1,69 +0,0 @@ -# Add application configuration variables here, as shown below. - -POSTGRES_HOST: localhost -POSTGRES_PASSWORD: -REDIS_HOST: localhost -ELASTICSEARCH_HOST: localhost - -SECRET_KEY_BASE: 83daf5e7b80d990f037407bab78dff9904aaf3c195a50f84fa8695a22287e707dfbd9524b403b1dcf116ae1d8c06844c3d7ed942564e5b46be6ae3ead93a9d30 -STRIPE_API_KEY: -STRIPE_PUBLISHABLE_KEY: -STRIPE_CURRENCY: 'eur' - -INVOICE_PREFIX: Demo-FabLab-facture -FABLAB_WITHOUT_PLANS: 'false' -FABLAB_WITHOUT_SPACES: 'true' - -DEFAULT_MAIL_FROM: Fab Manager Demo - -# For prod & staging env only -DEFAULT_HOST: fab-manager.com -DEFAULT_PROTOCOL: https -DELIVERY_METHOD: smtp -SMTP_ADDRESS: -SMTP_PORT: '587' -SMTP_USER_NAME: -SMTP_PASSWORD: -GA_ID: '' -## - -ADMIN_EMAIL: 'admin@fab-manager.com' -ADMIN_PASSWORD: 'adminadmin' - -DISQUS_SHORTNAME: - -TWITTER_NAME: 'FablabGrenoble' -TWITTER_CONSUMER_KEY: '' -TWITTER_CONSUMER_SECRET: '' -TWITTER_ACCESS_TOKEN: '' -TWITTER_ACCESS_TOKEN_SECRET: '' - -FACEBOOK_APP_ID: '' - -RAILS_LOCALE: 'fr' -APP_LOCALE: 'fr' -MOMENT_LOCALE: 'fr' -SUMMERNOTE_LOCALE: 'fr-FR' -ANGULAR_LOCALE: 'fr-fr' -MESSAGEFORMAT_LOCALE: 'fr' -FULLCALENDAR_LOCALE: 'fr' - -ELASTICSEARCH_LANGUAGE_ANALYZER: 'french' - -TIME_ZONE: 'Paris' -WEEK_STARTING_DAY: 'monday' -D3_DATE_FORMAT: '%d/%m/%y' -UIB_DATE_FORMAT: 'dd/MM/yyyy' -EXCEL_DATE_FORMAT: 'dd/mm/yyyy' - -OPENLAB_APP_SECRET: -OPENLAB_APP_ID: -OPENLAB_BASE_URI: 'https://openprojects.fab-manager.com' - -LOG_LEVEL: 'debug' - -ALLOWED_EXTENSIONS: pdf ai eps cad math svg stl dxf dwg obj step iges igs 3dm 3dmf doc docx png ino scad fcad skp sldprt sldasm slddrw slddrt tex latex ps -ALLOWED_MIME_TYPES: application/pdf application/postscript application/illustrator image/x-eps image/svg+xml application/sla application/dxf application/acad application/dwg application/octet-stream application/step application/iges model/iges x-world/x-3dmf application/vnd.openxmlformats-officedocument.wordprocessingml.document image/png text/x-arduino text/plain application/scad application/vnd.sketchup.skp application/x-koan application/vnd-koan koan/x-skm application/vnd.koan application/x-tex application/x-latex - -# 10485760 = 10 megabytes -MAX_IMAGE_SIZE: '10485760' diff --git a/config/database.yml.default b/config/database.yml.default deleted file mode 100644 index 64162614a..000000000 --- a/config/database.yml.default +++ /dev/null @@ -1,39 +0,0 @@ -development: - adapter: postgresql - host: localhost - encoding: unicode - database: fabmanager_development - pool: 25 - username: sleede - password: sleede - -# Warning: The database defined as "test" will be erased and -# re-generated from your development database when you run "rake". -# Do not set this db to the same as development or production. -test: - adapter: postgresql - host: localhost - encoding: unicode - database: fabmanager_test - pool: 25 - username: sleede - password: sleede - -staging: - adapter: postgresql - host: localhost - encoding: unicode - database: fabmanager_development - pool: 25 - username: sleede - password: sleede - - -production: - adapter: postgresql - host: localhost - encoding: unicode - database: fabmanager_development - pool: 25 - username: sleede - password: sleede diff --git a/config/locales/app.admin.pt-BR.yml b/config/locales/app.admin.pt.yml similarity index 99% rename from config/locales/app.admin.pt-BR.yml rename to config/locales/app.admin.pt.yml index 27bbf00cd..4ac881b30 100755 --- a/config/locales/app.admin.pt-BR.yml +++ b/config/locales/app.admin.pt.yml @@ -1,4 +1,4 @@ -pt-BR: +pt: app: admin: machines_new: diff --git a/config/locales/app.logged.pt-BR.yml b/config/locales/app.logged.pt.yml similarity index 99% rename from config/locales/app.logged.pt-BR.yml rename to config/locales/app.logged.pt.yml index 4b3bfad9c..e0d2be835 100755 --- a/config/locales/app.logged.pt-BR.yml +++ b/config/locales/app.logged.pt.yml @@ -1,4 +1,4 @@ -pt-BR: +pt: app: logged: profileCompletion: diff --git a/config/locales/app.public.pt-BR.yml b/config/locales/app.public.pt.yml similarity index 98% rename from config/locales/app.public.pt-BR.yml rename to config/locales/app.public.pt.yml index 458d1c29b..b3995881a 100755 --- a/config/locales/app.public.pt-BR.yml +++ b/config/locales/app.public.pt.yml @@ -1,4 +1,4 @@ -pt-BR: +pt: app: public: common: @@ -208,7 +208,7 @@ pt-BR: more_information: "Mais informação" your_subscription_expires_on_the_DATE: "Sua inscrição expira em {{DATE}}" # angular interpolation my_group: "Meu grupo" - his_group: "{GENDER, select, masculino{Ele} feminino{Ela} outro{Esses}} grupo" # messageFormat interpolation + his_group: "{GENDER, select, male{Ele} female{Ela} other{Esses}} group" # messageFormat interpolation he_wants_to_change_group: "{ROLE, select, admin{O usuário quer} other{Eu quero}} trocar de grupo" # messageFormat interpolation change_my_group: "Mudar {ROLE, select, admin{{GENDER, select, male{dele} female{dela} other{esses}}} other{meu}} grupo" # messageFormat interpolation your_subscription_has_expired_on_the_DATE: "Sua inscrição expirou em {{DATE}}" # angular interpolation diff --git a/config/locales/app.shared.pt-BR.yml b/config/locales/app.shared.pt.yml similarity index 99% rename from config/locales/app.shared.pt-BR.yml rename to config/locales/app.shared.pt.yml index 1e8708cb1..f35f37288 100755 --- a/config/locales/app.shared.pt-BR.yml +++ b/config/locales/app.shared.pt.yml @@ -1,4 +1,4 @@ -pt-BR: +pt: app: shared: buttons: diff --git a/config/locales/devise.pt-BR.yml b/config/locales/devise.pt.yml similarity index 99% rename from config/locales/devise.pt-BR.yml rename to config/locales/devise.pt.yml index e7950d482..18bda1655 100755 --- a/config/locales/devise.pt-BR.yml +++ b/config/locales/devise.pt.yml @@ -1,6 +1,6 @@ # Additional translations at https://github.com/plataformatec/devise/wiki/I18n -pt-BR: +pt: devise: confirmations: confirmed: "Sua conta foi confirmada com sucesso." diff --git a/config/locales/mails.pt-BR.yml b/config/locales/mails.pt.yml similarity index 99% rename from config/locales/mails.pt-BR.yml rename to config/locales/mails.pt.yml index 6bc5393e5..0cae46c74 100755 --- a/config/locales/mails.pt-BR.yml +++ b/config/locales/mails.pt.yml @@ -1,4 +1,4 @@ -pt-BR: +pt: layouts: notifications_mailer: see_you_later: "Te vejo em breve em {GENDER, select, other{the}}" # messageFormat interpolation diff --git a/config/locales/pt-BR.yml b/config/locales/pt.yml similarity index 99% rename from config/locales/pt-BR.yml rename to config/locales/pt.yml index 43a77b77a..8d4785a3c 100755 --- a/config/locales/pt-BR.yml +++ b/config/locales/pt.yml @@ -1,4 +1,4 @@ -pt-BR: +pt: duration: # subscription plan duration diff --git a/vendor/assets/components/angular-translate-interpolation-messageformat/angular-translate-interpolation-messageformat.js b/vendor/assets/components/angular-translate-interpolation-messageformat/angular-translate-interpolation-messageformat.js index 315996e1c..238c9ee57 100644 --- a/vendor/assets/components/angular-translate-interpolation-messageformat/angular-translate-interpolation-messageformat.js +++ b/vendor/assets/components/angular-translate-interpolation-messageformat/angular-translate-interpolation-messageformat.js @@ -79,7 +79,6 @@ function $translateMessageFormatInterpolation($translateSanitization, $cacheFact $translateInterpolator.setLocale = function (locale) { $mf = $cache.get(locale); if (!$mf) { - locale = locale == "pt-BR" ? "br" : locale; $mf = new MessageFormat(locale); $cache.put(locale, $mf); } From ffa4cbd4e432e60597752e9caa351fcb42de0ca9 Mon Sep 17 00:00:00 2001 From: Alex Coelho Date: Thu, 1 Jun 2017 12:38:18 -0300 Subject: [PATCH 2/3] Files conf --- config/application.yml.default | 69 ++++++++++++++++++++++++++++++++++ config/database.yml.default | 39 +++++++++++++++++++ 2 files changed, 108 insertions(+) create mode 100644 config/application.yml.default create mode 100644 config/database.yml.default diff --git a/config/application.yml.default b/config/application.yml.default new file mode 100644 index 000000000..68b387a4b --- /dev/null +++ b/config/application.yml.default @@ -0,0 +1,69 @@ +-# Add application configuration variables here, as shown below. +- +-POSTGRES_HOST: localhost +-POSTGRES_PASSWORD: +-REDIS_HOST: localhost +-ELASTICSEARCH_HOST: localhost +- +-SECRET_KEY_BASE: 83daf5e7b80d990f037407bab78dff9904aaf3c195a50f84fa8695a22287e707dfbd9524b403b1dcf116ae1d8c06844c3d7ed942564e5b46be6ae3ead93a9d30 +-STRIPE_API_KEY: +-STRIPE_PUBLISHABLE_KEY: +-STRIPE_CURRENCY: 'eur' +- +-INVOICE_PREFIX: Demo-FabLab-facture +-FABLAB_WITHOUT_PLANS: 'false' +-FABLAB_WITHOUT_SPACES: 'true' +- +-DEFAULT_MAIL_FROM: Fab Manager Demo +- +-# For prod & staging env only +-DEFAULT_HOST: fab-manager.com +-DEFAULT_PROTOCOL: https +-DELIVERY_METHOD: smtp +-SMTP_ADDRESS: +-SMTP_PORT: '587' +-SMTP_USER_NAME: +-SMTP_PASSWORD: +-GA_ID: '' +-## +- +-ADMIN_EMAIL: 'admin@fab-manager.com' +-ADMIN_PASSWORD: 'adminadmin' +- +-DISQUS_SHORTNAME: +- +-TWITTER_NAME: 'FablabGrenoble' +-TWITTER_CONSUMER_KEY: '' +-TWITTER_CONSUMER_SECRET: '' +-TWITTER_ACCESS_TOKEN: '' +-TWITTER_ACCESS_TOKEN_SECRET: '' +- +-FACEBOOK_APP_ID: '' +- +-RAILS_LOCALE: 'fr' +-APP_LOCALE: 'fr' +-MOMENT_LOCALE: 'fr' +-SUMMERNOTE_LOCALE: 'fr-FR' +-ANGULAR_LOCALE: 'fr-fr' +-MESSAGEFORMAT_LOCALE: 'fr' +-FULLCALENDAR_LOCALE: 'fr' +- +-ELASTICSEARCH_LANGUAGE_ANALYZER: 'french' +- +-TIME_ZONE: 'Paris' +-WEEK_STARTING_DAY: 'monday' +-D3_DATE_FORMAT: '%d/%m/%y' +-UIB_DATE_FORMAT: 'dd/MM/yyyy' +-EXCEL_DATE_FORMAT: 'dd/mm/yyyy' +- +-OPENLAB_APP_SECRET: +-OPENLAB_APP_ID: +-OPENLAB_BASE_URI: 'https://openprojects.fab-manager.com' +- +-LOG_LEVEL: 'debug' +- +-ALLOWED_EXTENSIONS: pdf ai eps cad math svg stl dxf dwg obj step iges igs 3dm 3dmf doc docx png ino scad fcad skp sldprt sldasm slddrw slddrt tex latex ps +-ALLOWED_MIME_TYPES: application/pdf application/postscript application/illustrator image/x-eps image/svg+xml application/sla application/dxf application/acad application/dwg application/octet-stream application/step application/iges model/iges x-world/x-3dmf application/vnd.openxmlformats-officedocument.wordprocessingml.document image/png text/x-arduino text/plain application/scad application/vnd.sketchup.skp application/x-koan application/vnd-koan koan/x-skm application/vnd.koan application/x-tex application/x-latex +- +-# 10485760 = 10 megabytes +-MAX_IMAGE_SIZE: '10485760' \ No newline at end of file diff --git a/config/database.yml.default b/config/database.yml.default new file mode 100644 index 000000000..64162614a --- /dev/null +++ b/config/database.yml.default @@ -0,0 +1,39 @@ +development: + adapter: postgresql + host: localhost + encoding: unicode + database: fabmanager_development + pool: 25 + username: sleede + password: sleede + +# Warning: The database defined as "test" will be erased and +# re-generated from your development database when you run "rake". +# Do not set this db to the same as development or production. +test: + adapter: postgresql + host: localhost + encoding: unicode + database: fabmanager_test + pool: 25 + username: sleede + password: sleede + +staging: + adapter: postgresql + host: localhost + encoding: unicode + database: fabmanager_development + pool: 25 + username: sleede + password: sleede + + +production: + adapter: postgresql + host: localhost + encoding: unicode + database: fabmanager_development + pool: 25 + username: sleede + password: sleede From 4bae8e4bb602f8d6a10cd7918c579a05072530ca Mon Sep 17 00:00:00 2001 From: Alex Coelho Date: Thu, 1 Jun 2017 12:41:10 -0300 Subject: [PATCH 3/3] Files conf --- config/application.yml.default | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/application.yml.default b/config/application.yml.default index 68b387a4b..dca8ea779 100644 --- a/config/application.yml.default +++ b/config/application.yml.default @@ -66,4 +66,4 @@ -ALLOWED_MIME_TYPES: application/pdf application/postscript application/illustrator image/x-eps image/svg+xml application/sla application/dxf application/acad application/dwg application/octet-stream application/step application/iges model/iges x-world/x-3dmf application/vnd.openxmlformats-officedocument.wordprocessingml.document image/png text/x-arduino text/plain application/scad application/vnd.sketchup.skp application/x-koan application/vnd-koan koan/x-skm application/vnd.koan application/x-tex application/x-latex - -# 10485760 = 10 megabytes --MAX_IMAGE_SIZE: '10485760' \ No newline at end of file +-MAX_IMAGE_SIZE: '10485760'