Skip to content

Commit

Permalink
Resolve new RuboCop offenses
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexWayfer committed May 24, 2021
1 parent e74d91c commit f7bc300
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 24 deletions.
18 changes: 10 additions & 8 deletions lib/r18n-core/locale.rb
Original file line number Diff line number Diff line change
Expand Up @@ -127,14 +127,16 @@ def initialize
@parent = self.class.superclass.new
end

set sublocales: [],
week_start: :monday,
time_am: 'AM',
time_pm: 'PM',
time_format: '_ %R',
time_with_seconds_format: '_ %T',
full_format: '%-d %B',
year_format: '_ %Y'
set(
sublocales: [],
week_start: :monday,
time_am: 'AM',
time_pm: 'PM',
time_format: '_ %R',
time_with_seconds_format: '_ %T',
full_format: '%-d %B',
year_format: '_ %Y'
)

def month_standalone
month_names
Expand Down
6 changes: 4 additions & 2 deletions lib/r18n-core/locales/en-au.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ module R18n
module Locales
# Australian English locale
class EnAU < En
set title: 'Australian English',
sublocales: %w[en en-US en-GB]
set(
title: 'Australian English',
sublocales: %w[en en-US en-GB]
)
end
end
end
30 changes: 16 additions & 14 deletions lib/r18n-core/locales/sr-latn.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,26 @@ module R18n
module Locales
# Serbian Latin locale
class SrLatn < Locale
set title: 'Srpski',
sublocales: [],
set(
title: 'Srpski',
sublocales: [],

week_start: :monday,
wday_names: %w[nedelja ponedeljak utorak sreda četvrtak petak subota],
wday_abbrs: %w[ned pon uto sri čet pet sub],
week_start: :monday,
wday_names: %w[nedelja ponedeljak utorak sreda četvrtak petak subota],
wday_abbrs: %w[ned pon uto sri čet pet sub],

month_names: %w[
januar februar mart april maj juni juli avgust septembar oktobar
novembar decembar
],
month_abbrs: %w[jan feb mar apr maj jun jul avg sep okt nov dec],
month_names: %w[
januar februar mart april maj juni juli avgust septembar oktobar
novembar decembar
],
month_abbrs: %w[jan feb mar apr maj jun jul avg sep okt nov dec],

date_format: '%d.%m.%Y',
full_format: '%-d. %B',
date_format: '%d.%m.%Y',
full_format: '%-d. %B',

number_decimal: ',',
number_group: '.'
number_decimal: ',',
number_group: '.'
)

def pluralize(number)
if number.zero?
Expand Down

0 comments on commit f7bc300

Please sign in to comment.