Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AO3-6691 Remove dot from link in custom cop #4779

Merged
merged 2 commits into from
Apr 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion config/locales/views/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,7 @@ en:
fandom_relationship_tags: Relationship tags in this fandom
filter_bookmarks: filter bookmarks
filter_works: filter works
list_fandom_tags_html: You can also access a list of %{fandom_relationship_tags_link}.
list_fandom_tags_html: You can also access a list of %{fandom_relationship_tags_link}.
time:
formats:
date_short_html: <abbr class="day" title="%A">%a</abbr> <span class="date">%d</span> <abbr class="month" title="%B">%b</abbr> <span class="year">%Y</span>
Expand Down
2 changes: 1 addition & 1 deletion rubocop/cop/i18n/deprecated_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module I18n
# t(".relative.path.to.translation")
# t(".greeting", name: "world")
class DeprecatedHelper < RuboCop::Cop::Base
MSG = "Prefer Rails built-in `t` helper over `ts`: the latter is not actually translatable. For more information, refer to https://github.com/otwcode/otwarchive/wiki/Internationalization-(i18n)-Standards."
MSG = "Prefer Rails built-in `t` helper over `ts`: the latter is not actually translatable. For more information, refer to https://github.com/otwcode/otwarchive/wiki/Internationalization-(i18n)-Standards"

RESTRICT_ON_SEND = %i[ts].freeze

Expand Down
4 changes: 2 additions & 2 deletions spec/rubocop/cop/i18n/deprecated_helper_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
it "registers an offense when `ts` is used" do
expect_offense(<<~INVALID)
ts("Some String")
^^^^^^^^^^^^^^^^^ Prefer Rails built-in `t` helper over `ts`: the latter is not actually translatable. For more information, refer to https://github.com/otwcode/otwarchive/wiki/Internationalization-(i18n)-Standards.
^^^^^^^^^^^^^^^^^ Prefer Rails built-in `t` helper over `ts`: the latter is not actually translatable. For more information, refer to https://github.com/otwcode/otwarchive/wiki/Internationalization-(i18n)-Standards
INVALID
end

it "registers an offense when `ts` is used without parentheses" do
expect_offense(<<~INVALID)
ts "Another string"
^^^^^^^^^^^^^^^^^^^ Prefer Rails built-in `t` helper over `ts`: the latter is not actually translatable. For more information, refer to https://github.com/otwcode/otwarchive/wiki/Internationalization-(i18n)-Standards.
^^^^^^^^^^^^^^^^^^^ Prefer Rails built-in `t` helper over `ts`: the latter is not actually translatable. For more information, refer to https://github.com/otwcode/otwarchive/wiki/Internationalization-(i18n)-Standards
INVALID
end

Expand Down
Loading