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

Update from 0.2.1 to 0.3.0: Translations missing or upgrade error.. #100

Closed
digitalkram opened this issue Sep 1, 2014 · 6 comments
Closed

Comments

@digitalkram
Copy link

hi there,

I wanted to report a bug for 0.2.1 that is that audio/video player is not working on a recent Safari browser powered by Mac OS since the update to this version.

During that process I noticed there is 0.3.0 available thus I decided to upgrade first and re-try Safari on 0.3.0.

On our playground/dev system I tried the upgrade from 0.2.1 to 0.3.0 by following the wiki instructions and checking the changelog for version specifics.

The update itself went pretty smooth however in the Editor there is a couple of placeholders instead of expected text (sorry I onyl have the German text):

In "Titel und Optionen" (Title and options?) there is a Tab called "Allgemein" (Common?) which features three textboxes that are labeled:
[missing "de.activerecord.attributes.pageflow/entry.title" translation]
[missing "de.activerecord.attributes.pageflow/entry.summary" translation]
[missing "de.activerecord.attributes.pageflow/entry.credits" translation]

There is a second Tab "labeled" [missing "de.editor.configuration_editor.tabs.widgets" translation]:
That has two checkboxes labeled:
[missing "de.activerecord.attributes.pageflow/entry.manual_start" translation]
[missing "de.activerecord.attributes.pageflow/entry.home_button_enabled" translation]

Every other text in the Editor is existing.

Before I can push this further I need to know if an what I did wrong during update.

Suggestions/Pointers are highly appreciated. :) Thanks a lot in advance!

Another small thing:
When I disabled the new home button in our custom theme it is no longer there (which is fine). However the new Top button seems to be no link. How to enable it point it to the first page?

Cheers,

@tf
Copy link
Member

tf commented Sep 1, 2014

Hi,

the translation issue could be caused by cached asset files. I've run into similar problems in the past, but could never really put my finger on it.

Here's what might be happening: The i18n-js gem generates the file i18n/translations.js (or provides it on the fly in development). It contains the translations as javascript and is required in your pageflow/editor.js. Sometimes when updating the Pageflow gem, the asset pipeline (or the i18n-js gem?) does not seem to notice that translations changed. The translations.js is thus not regenerated.

Some things you can try:

  • Touch your pageflow/editor.js to trigger recompilation (insert blank line etc)
  • Remove or rename app/assets/javascripts/i18n/translations.yml
  • Remove or rename tmp/i18n-js.yml
  • Remove tmp/cache/assets/development/sprockets

After each step a server restart might be necessary for changes to take effect. I'd be really interested in finding out what causes this issue. So please perform the above steps one by one to see what helps (if any).

Regarding the new top button. Have you changed your theme to style .navigation_top instead of .navigation_home? There should definitely be a a.navigation_home in the DOM.

Cheers

@digitalkram
Copy link
Author

ad 1) doesn't exist, tried with ./app/assets/javascripts/pageflow/editor.js + restart => didn't help
ad 2) doesn't exist
ad 3) doesn't exist, tried with ./tmp/cache/i18n-js.yml + restart => didn't help
ad 4) worked out. :)

Regaring the top button:
I created a backup of our custom theme and did:
rails generate pageflow:theme my_custom_theme
and merged our changes manually.

The resulting code is:
<a class="navigation_bullet navigation_top deactivated"...

Probably the deactivated class is the problem?

@tf
Copy link
Member

tf commented Sep 1, 2014

Well, the deactivated class is there whenever you already are on the first page. Not really sure why styles do not apply in your case...

@tf
Copy link
Member

tf commented Sep 1, 2014

Regarding the i18n caching issue: Not really sure what to do. Seems ugly to add a note to the update wiki page saying one has to delete the tmp directoy. Still, probably better than nothing though. Ideally, this should somehow lead us to a PR for the i18n-js gem.

@digitalkram
Copy link
Author

hi again,

okay, thanks. I really mamaged to inspect the Top butotn on the first page...

Thanks for your help!
Cheers,

@tyranni
Copy link
Contributor

tyranni commented Sep 3, 2014

Sorry for this late response. (struggled with the flu... finally won ;))
My experience is, that the "missing...translation" issues often occur if somthing is wrong with the database. Finally a forgotten "bundle exec rake db:migrate" could be responsible for that kind of issue ;).
Best regards and
don't get the flu! ;)

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

No branches or pull requests

3 participants