Use JavaScript pluralize for budget staff
We were using two different systems to set translations in JavaScript: to set the text for languages, we were using data attributes, and to set the text for staff members, we were using AJAX calls. I find data attributes keep the code more simple, since there's no need to define an extra route and controller action. Furthermore, the user experience is better because response times are faster. So now both places use data attributes.
This commit is contained in:
@@ -72,13 +72,6 @@ class Admin::BudgetsController < Admin::BaseController
|
||||
end
|
||||
end
|
||||
|
||||
def assigned_users_translation
|
||||
render json: { administrators: t("admin.budgets.edit.administrators", count: params[:administrators].to_i),
|
||||
valuators: t("admin.budgets.edit.valuators", count: params[:valuators].to_i),
|
||||
trackers: t("admin.budgets.edit.trackers", count: params[:trackers].to_i)
|
||||
}
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def budget_params
|
||||
|
||||
Reference in New Issue
Block a user