From 150bb1a7513801c1b085e83ac6051fd09b9cf6c3 Mon Sep 17 00:00:00 2001 From: Yan Date: Thu, 12 Oct 2017 14:44:30 +0630 Subject: [PATCH 1/6] add mm --- app/views/layouts/_sidebar.html.erb | 18 +++++++++--------- app/views/layouts/application.html.erb | 1 - config/locales/en.yml | 19 +++++++++++++++++++ config/locales/mm.yml | 19 ++++++++++++++++++- 4 files changed, 46 insertions(+), 11 deletions(-) diff --git a/app/views/layouts/_sidebar.html.erb b/app/views/layouts/_sidebar.html.erb index 571e7632..b74ec6ae 100644 --- a/app/views/layouts/_sidebar.html.erb +++ b/app/views/layouts/_sidebar.html.erb @@ -1,24 +1,24 @@ <% end %> <% end %> -

<%= t 'welcome' %>

<%= yield %> diff --git a/config/locales/en.yml b/config/locales/en.yml index ba4f31fa..39bd8303 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1,5 +1,24 @@ en: welcome: "Welcome" + main_navigation: "Main Navigation" + dashboard: "Dashboard" + oqs: "Order Queue Station" + origami: "Cashier" + crm: "CRM" + inventory: "Inventory" + settings: "Settings" + transactions: "Transactions" + reports: "Reports" + zones: "Zones" + menu: "Menu" + cashier: "Cashier" + terminal: "Terminal" + print: "Print" + staff: "Staff" + product: "Product" + promotion: "Promotion" + + views: pagination: first: "« First" diff --git a/config/locales/mm.yml b/config/locales/mm.yml index 69a9131e..711041d5 100644 --- a/config/locales/mm.yml +++ b/config/locales/mm.yml @@ -1,5 +1,22 @@ mm: - welcome: "လာပါ" + welcome: "မဂ်လာပါ" + main_navigation: "မာတိကာ" + dashboard: "မျက်နှာစာ" + oqs: "အမှာစာနေရာများ" + origami: "အရောင်းဌာန" + crm: "စားသုံးသူကြီးကြပ်ရေး" + inventory: "ကုန်လှောင်ရုံ" + settings: "သတ်မှတ်ချက်များ" + transactions: "အလုပ်ဲပြီးမြောက်မှု့များ" + reports: "အစီရင်ခံစာ" + zones: "Zones" + menu: "Menu" + cashier: "Cashier" + terminal: "Terminal" + print: "Print" + staff: "Staff" + product: "Product" + promotion: "Promotion" views: pagination: first: "« ပထမ" From 429842ad9c45d1ec46e0713fb3ad6562370631db Mon Sep 17 00:00:00 2001 From: Yan Date: Thu, 12 Oct 2017 14:46:04 +0630 Subject: [PATCH 2/6] add mm menu --- config/locales/mm.yml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/config/locales/mm.yml b/config/locales/mm.yml index 69a9131e..711041d5 100644 --- a/config/locales/mm.yml +++ b/config/locales/mm.yml @@ -1,5 +1,22 @@ mm: - welcome: "လာပါ" + welcome: "မဂ်လာပါ" + main_navigation: "မာတိကာ" + dashboard: "မျက်နှာစာ" + oqs: "အမှာစာနေရာများ" + origami: "အရောင်းဌာန" + crm: "စားသုံးသူကြီးကြပ်ရေး" + inventory: "ကုန်လှောင်ရုံ" + settings: "သတ်မှတ်ချက်များ" + transactions: "အလုပ်ဲပြီးမြောက်မှု့များ" + reports: "အစီရင်ခံစာ" + zones: "Zones" + menu: "Menu" + cashier: "Cashier" + terminal: "Terminal" + print: "Print" + staff: "Staff" + product: "Product" + promotion: "Promotion" views: pagination: first: "« ပထမ" From a6b8389fd0afc40e58dd8b925ec12742bd552a51 Mon Sep 17 00:00:00 2001 From: Yan Date: Thu, 12 Oct 2017 15:34:16 +0630 Subject: [PATCH 3/6] add mm --- app/controllers/application_controller.rb | 10 ++++---- app/views/layouts/_left_sidebar.html.erb | 30 +++++++++++------------ app/views/layouts/application.html.erb | 1 + config/locales/mm.yml | 6 +++-- 4 files changed, 25 insertions(+), 22 deletions(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index da72a194..33ee425c 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -12,11 +12,6 @@ class ApplicationController < ActionController::Base #all token authentication must be done here #response format must be set to JSON - rescue_from CanCan::AccessDenied do |exception| - flash[:warning] = exception.message - redirect_to root_path - end - def set_locale I18n.locale = params[:locale] || I18n.default_locale end @@ -72,6 +67,11 @@ class ApplicationController < ActionController::Base @default_config ||= ActiveRecord::Base.connection.instance_variable_get("@config").dup end + rescue_from CanCan::AccessDenied do |exception| + flash[:warning] = exception.message + redirect_to root_path + end + def current_user @current_user ||= Employee.find_by_token_session(session[:session_token]) if session[:session_token] end diff --git a/app/views/layouts/_left_sidebar.html.erb b/app/views/layouts/_left_sidebar.html.erb index 9af8fcac..aaa89fc9 100644 --- a/app/views/layouts/_left_sidebar.html.erb +++ b/app/views/layouts/_left_sidebar.html.erb @@ -28,41 +28,41 @@ diff --git a/app/views/layouts/login.html.erb b/app/views/layouts/login.html.erb index 5644ef74..e5836701 100644 --- a/app/views/layouts/login.html.erb +++ b/app/views/layouts/login.html.erb @@ -58,9 +58,11 @@ diff --git a/config/locales/en.yml b/config/locales/en.yml index 39bd8303..8e5f1c99 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -10,13 +10,15 @@ en: transactions: "Transactions" reports: "Reports" zones: "Zones" + dinings: "Dinings" menu: "Menu" cashier: "Cashier" terminal: "Terminal" print: "Print" staff: "Staff" - product: "Product" - promotion: "Promotion" + products: "Products" + promotions: "Promotions" + printer: "Printer" views: diff --git a/config/locales/mm.yml b/config/locales/mm.yml index a4c1c1bb..6013c33e 100644 --- a/config/locales/mm.yml +++ b/config/locales/mm.yml @@ -19,6 +19,8 @@ mm: products: "Products" promotions: "Promotions" printer: "Printer" + + views: pagination: first: "« ပထမ" From 2379079b03e9a9590b08a54e397e7b00e639a995 Mon Sep 17 00:00:00 2001 From: Yan Date: Thu, 12 Oct 2017 18:08:49 +0630 Subject: [PATCH 6/6] add mm --- app/views/home/dashboard.html.erb | 10 ++++---- app/views/layouts/_header.html.erb | 2 +- app/views/layouts/_left_sidebar.html.erb | 6 ++--- config/locales/en.yml | 7 +++++- config/locales/mm.yml | 29 ++++++++++++++---------- 5 files changed, 32 insertions(+), 22 deletions(-) diff --git a/app/views/home/dashboard.html.erb b/app/views/home/dashboard.html.erb index b04993ff..0bffc868 100644 --- a/app/views/home/dashboard.html.erb +++ b/app/views/home/dashboard.html.erb @@ -1,6 +1,6 @@
-

DASHBOARD

+

<%= t :dashboard %>

@@ -57,7 +57,7 @@
-

Top Products

+

<%= (t :top) + " " + (t :products) %>

@@ -65,7 +65,7 @@
-

Inventory

+

<%= t :inventory %>

@@ -76,7 +76,7 @@
-

Hourly Sales

+

<%= (t :hourly) + " " + (t :sale) %>

@@ -84,7 +84,7 @@
-

Employee Sales

+

<%= (t :staff) + " " + (t :sale) %>

diff --git a/app/views/layouts/_header.html.erb b/app/views/layouts/_header.html.erb index 2bf4c073..8d86f8d5 100644 --- a/app/views/layouts/_header.html.erb +++ b/app/views/layouts/_header.html.erb @@ -27,7 +27,7 @@ diff --git a/app/views/layouts/_left_sidebar.html.erb b/app/views/layouts/_left_sidebar.html.erb index bc891cd5..5cd62153 100644 --- a/app/views/layouts/_left_sidebar.html.erb +++ b/app/views/layouts/_left_sidebar.html.erb @@ -66,13 +66,13 @@ diff --git a/config/locales/en.yml b/config/locales/en.yml index 8e5f1c99..e8cdce94 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -19,7 +19,12 @@ en: products: "Products" promotions: "Promotions" printer: "Printer" - + logout: "Logout" + sale: "Sale" + hourly: "Hourly" + top: "Top" + orders: "Orders" + credit: "Credit" views: pagination: diff --git a/config/locales/mm.yml b/config/locales/mm.yml index 6013c33e..827edf46 100644 --- a/config/locales/mm.yml +++ b/config/locales/mm.yml @@ -3,23 +3,28 @@ mm: main_navigation: "မာတိကာ" dashboard: "မျက်နှာစာ" oqs: "အမှာစာနေရာများ" - origami: "အရောင်းဌာန" + origami: "အရောင်းကောင်တာ" crm: "စားသုံးသူကြီးကြပ်ရေး" inventory: "ကုန်လှောင်ရုံ" settings: "သတ်မှတ်ချက်များ" transactions: "အလုပ်ပြီးမြောက်မှု့များ" reports: "အစီရင်ခံစာ" - zones: "Zones" - dinings: "Dinings" - menu: "Menu" - cashier: "Cashier" - terminal: "Terminal" - print: "Print" - staff: "Staff" - products: "Products" - promotions: "Promotions" - printer: "Printer" - + zones: "ဇုန်" + dinings: "စားပွဲရုံ" + menu: "စားဖွယ်စုံ" + cashier: "ငွေရှင်း" + terminal: "ကောင်တာ" + print: "စာထုတ်ပါ" + staff: "၀န်ထမ်းများ" + products: "ကုန်စည်များ" + promotions: "အရောင်းမြှင့်တင်ရေး" + printer: "ပရင့်တာ" + logout: "ထွက်ရန်" + sale: "အရောင်း" + hourly: "နာရီအလိုက်" + top: "အရောင်းရဆုံး" + orders: "အော်ဒါများ" + credit: "အကြွေး" views: pagination: