In the admin section of the application, a new page has been added so that the admins are able to manage the selected texts for translate. The texts have been divided in different "sections", depending on the nature of themselves (budgets, polls, proposals, management, etc.). Each section has become a tab with a form associated to edit all the texts for her. When a language is added, it's added for ALL the texts in the application. That means that, if an admin adds french for debates, the french form will appear for the rest of the texts. That doesn't mean that they need to fill all the texts, only that the languages work for all of them instead of individually.
6 lines
152 B
Ruby
6 lines
152 B
Ruby
class I18nContentTranslation < ActiveRecord::Base
|
|
def self.existing_languages
|
|
self.select(:locale).uniq.map{ |l| l.locale.to_sym }.to_a
|
|
end
|
|
end
|