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

Add ability to translate image_title and image_alt fields #2965

Merged
merged 1 commit into from
Jul 27, 2015

Conversation

bricesanchez
Copy link
Member

No description provided.

@bricesanchez bricesanchez force-pushed the feature-translate-images branch from e6147c3 to d50ecad Compare April 30, 2015 17:51
@@ -19,6 +19,12 @@ def thumbnail_urls(image)

thumbnail_urls
end

# We show the title from the next available locale
# if there is no title for the current locale
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure if this is what users wants everytime.

Copy link
Member

@parndt parndt Apr 30, 2015 via email

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

Do you have any clue to fix this?

Copy link
Member

Choose a reason for hiding this comment

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

We do that on the backend because otherwise it is simply blank, but we don't want to display wrong content on the frontend. Maybe we should write the pages one better too.

Copy link
Member Author

Choose a reason for hiding this comment

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

At this time we only use image_title_with_translations method in backend.

@bricesanchez bricesanchez force-pushed the feature-translate-images branch 2 times, most recently from 7dbb04c to 180446e Compare May 1, 2015 19:49
@bricesanchez bricesanchez added this to the 3.0 milestone May 2, 2015
let(:gridview_title_selector) {'[tooltip]'}
let(:gridview_alt_selector) {'[alt]'}
let(:listview_title_selector) {' > span.title'}
let(:listview_filename_selector) {' > span.preview'}
Copy link
Member

Choose a reason for hiding this comment

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

this changeset is a great example of why aligning things isn't ideal 😄

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, good to know :)

@bricesanchez
Copy link
Member Author

@parndt Are you ok to merge this PR ?

@parndt
Copy link
Member

parndt commented May 6, 2015

I note there are no tests specific to this feature?

@bricesanchez
Copy link
Member Author

Is someone could help me to test this PR ?

@parndt parndt force-pushed the feature-translate-images branch from 180446e to a531e3b Compare July 2, 2015 22:40
@parndt
Copy link
Member

parndt commented Jul 2, 2015

@anitagraham do you have any ideas? I know you've been working on images specs lately.

@anitagraham
Copy link
Contributor

Yes, having a look at how the translations for page title are tested.
Testing failures due to incompatibility between Rspec and rspec-retry. (See gitter comment) make it a bit slower.

@bricesanchez
Copy link
Member Author

Thanks @anitagraham, it's really appreciated!

@parndt
Copy link
Member

parndt commented Jul 19, 2015

So, to confirm: is the point of this feature so that the user can avoid uploading an image per locale?

@bricesanchez
Copy link
Member Author

Yes.

@bricesanchez
Copy link
Member Author

i will update this really soon PR :)

@bricesanchez bricesanchez force-pushed the feature-translate-images branch from a531e3b to 54f4018 Compare July 24, 2015 01:36
@bricesanchez bricesanchez changed the title Add ability to translate image_title and image_alt fields WIP : Add ability to translate image_title and image_alt fields Jul 24, 2015
@bricesanchez bricesanchez force-pushed the feature-translate-images branch from 54f4018 to b22eab5 Compare July 24, 2015 14:34
@bricesanchez bricesanchez changed the title WIP : Add ability to translate image_title and image_alt fields Add ability to translate image_title and image_alt fields Jul 24, 2015
@bricesanchez
Copy link
Member Author

It's ready @parndt :)

end

def self.down
Refinery::Image.drop_translation_table! migrate_data: true
Copy link
Member

Choose a reason for hiding this comment

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

I hate to say it but this is going to suffer the same problems as #2715 - can you please apply the same solution as in 8f56bf4 ?

@parndt
Copy link
Member

parndt commented Jul 27, 2015

@bricesanchez sorry, I missed the migration problems before 😦

@bricesanchez bricesanchez force-pushed the feature-translate-images branch from b22eab5 to 73cbef5 Compare July 27, 2015 13:06
@bricesanchez
Copy link
Member Author

@parndt no problems, is it ok like that now?

@parndt
Copy link
Member

parndt commented Jul 27, 2015

OK, I'm happy with this.
@simi what about you?

simi added a commit that referenced this pull request Jul 27, 2015
Add ability to translate image_title and image_alt fields
@simi simi merged commit 24b5217 into master Jul 27, 2015
@simi simi deleted the feature-translate-images branch July 27, 2015 21:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants