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

Added MOVE button translation key; improved italian translations #5180

Merged
merged 1 commit into from
Sep 20, 2017
Merged

Added MOVE button translation key; improved italian translations #5180

merged 1 commit into from
Sep 20, 2017

Conversation

blocknotes
Copy link

No description provided.

@blocknotes
Copy link
Author

I added "active_admin.filters.predicates.eq" also to en.yml because it's not translated in my language (italian).

In the first commit I added also the keys:

views.pagination.first
views.pagination.last
views.pagination.next
views.pagination.previous
views.pagination.truncate

Then I removed them because they are not defined in en.yml (for Travis) - shouldn't be added?

Copy link
Member

@deivid-rodriguez deivid-rodriguez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Translations themselves look good. Left some comments in other things, though.

Regarding pagination, I think you should head to the kaminari-i18n gem.

filters:
buttons:
filter: "Filter"
clear: "Clear Filters"
predicates:
contains: "Contains"
eq: "equals"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure but I think this a "native" ransack predicate so that's why we don't provide translation. It should be translated in ransack? @Fivell?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right, "eq" is in Ransack translations ransack_en. I could make a PR to Ransack for italian lang

@@ -21,12 +21,14 @@ en:
has_many_new: "Add New %{model}"
has_many_delete: "Delete"
has_many_remove: "Remove"
move: "MOVE"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we should keep the case consistent. I'm up for making this lowercase.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, I added it uppercase because in the source is uppercase

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will change in #3862 but I agree we should have localized. That way I can use it in #3862 as alt text. Agree with @deivid-rodriguez on keeping case consistent. The text in the source will be removed anyway. Thanks!

@@ -99,8 +99,8 @@ def has_many_actions(has_many_form, builder_options, contents)
if builder_options[:sortable]
has_many_form.input builder_options[:sortable], as: :hidden

contents << template.content_tag(:li, class: 'handle') do
"MOVE"
contents << template.content_tag(:li, class: 'handle sortable') do
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding the "sortable" seems unrelated to this PR, but I think it makes sense to me.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't add this class so just remove the change please. It has been changed in #3862.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes :) I added it just to make easier to style it

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't worry, we'll make sure it is in #3862 but we would prefer to avoid any changes here unless necessary and I don't think it is. I'll get that in #3862 for you. 😄

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ook thanks :)
removed in the next commit

@@ -20,6 +20,7 @@ it:
has_many_new: "Aggiungi nuovo/a %{model}"
has_many_delete: "Rimuovi"
has_many_remove: "Rimuovi"
move: "sposta"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You want this to start uppercase I guess?

Copy link
Author

@blocknotes blocknotes Sep 19, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, done.

@deivid-rodriguez
Copy link
Member

It's ready! Ideally you'd squash all commits into two, one for each sentence in the PR title:

  • Add MOVE button translation key.
  • Improve italian translations.

I'd do it like this:

git reset HEAD~7 # undo all commits and get the whole diff in your working tree
git add -p # and add interactively the changes for the first commit
git commit # commit the first set of changes
git commit -a # add and commit the rest of the changes
git push --force # force-push to the PR once you're sure everything is fine

@blocknotes
Copy link
Author

blocknotes commented Sep 19, 2017

Understood. But I made only a commit. Hope it's ok anyway

Copy link
Member

@deivid-rodriguez deivid-rodriguez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good enough to me! Grazie!! ❤️

@Fivell Fivell merged commit cbc155c into activeadmin:master Sep 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants