Skip to content

Commit

Permalink
Allow separate import and export locales (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
samward authored Sep 7, 2023
1 parent 7fb4425 commit b12e7e6
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@ Initial release
## [2.0.0] - 2023-08-03

Faraday version change

## [2.1.0] - 2023-08-03

Allow separate import and export locales
5 changes: 4 additions & 1 deletion lib/generators/templates/loco_sync_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@
# "untag-all": "unused"
# }

# Locales to import or export
# The source of truth for key names to be exported to Loco
# c.export_locales = ["en"]

# Locales to import
# c.locales = ["en"]

# Loco api base url
Expand Down
2 changes: 1 addition & 1 deletion lib/loco_sync/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module LocoSync
VERSION = "2.0.0"
VERSION = "2.1.0"
end
3 changes: 2 additions & 1 deletion lib/tasks/loco_sync_task.rake
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ namespace :loco_sync do

desc "Exports translation files from the current Rails project to localise.biz"
task :export do
LocoSync::Config.locales.each do |locale|
export_locales = LocoSync::Config.export_locales || LocoSync::Config.locales
export_locales do |locale|
puts "Exporting translations for locale: #{locale}"
LocoSync::Sync::Export.export!(locale: locale)
end
Expand Down

0 comments on commit b12e7e6

Please sign in to comment.