After a month and half using i18n gem, our en.yml file becomes gigantic. Is there any benefit from using the scope? We want the dictionary to be easier to translate and our dictionary to be dry, but we need to take into account different times and still use situations where we have “Are you sure you want to delete this object?”, “Are you sure you want to mark how is it completed? " Like "Are you sure you want {{verb}} {{noun}}?"
Well, in our organization, we completely translated it with the default directory structures proposed by Rails
, , .
, HomeController # :
t('.title')
/home/ {locale}.yml
{locale}: show: title:
. , , ""
{locale}: latest: title:
, , , ,
, t_t gem. . cheatsheet - # Actions : " , {{verb}} this { { }}?"
# Actions
:
Source: https://habr.com/ru/post/1764180/More articles:Runtime - Using Application Functions - rDialogEx with controls: resizing? - cDoes ASP.NET MVC 2.0 use exceptions to control flow? - asp.net-mvcDebugger improvements? - debuggingЕсть ли способ создать макрос препроцессора для функции? - c++Cannot connect to remote mysql server - mysqlРекомендации по проектированию простого веб-сервиса с кодами возврата - web-servicesJ2EE: Singleton against keeping things in session - javaNSMutableString appendString generates SIGABRT - objective-cDo not modify the list, but still get a ConcurrentModificationException - javaAll Articles