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

Problems with link between translated posts or pages #17

Open
taringamberini opened this issue Jul 27, 2015 · 1 comment
Open

Problems with link between translated posts or pages #17

taringamberini opened this issue Jul 27, 2015 · 1 comment

Comments

@taringamberini
Copy link

Setting Octopress

I've installed and configured Octopress as described at:

Installing octopress-multilingual

Then I've installed:

group :jekyll_plugins do
  gem 'octopress-multilingual'
end

I've run:

$ bundle
Using rake 10.4.2
Using RedCloth 4.2.9
Using blankslate 2.1.2.4
Using hitimes 1.2.2
Using timers 4.0.1
Using celluloid 0.16.0
Using chunky_png 1.3.4
Using fast-stemmer 1.0.2
Using classifier-reborn 2.0.3
Using coffee-script-source 1.9.1.1
Using execjs 2.5.2
Using coffee-script 2.4.1
Using colorator 0.1
Using multi_json 1.11.2
Using sass 3.4.16
Using compass-core 1.0.3
Using compass-import-once 1.0.5
Using rb-fsevent 0.9.5
Using ffi 1.9.10
Using rb-inotify 0.9.5
Using compass 1.0.3
Using tilt 2.0.1
Using haml 4.0.6
Using jekyll-coffeescript 1.0.1
Using jekyll-gist 1.2.1
Using jekyll-paginate 1.1.0
Using jekyll-sass-converter 1.3.0
Using listen 2.10.1
Using jekyll-watch 1.2.1
Using kramdown 1.8.0
Using liquid 2.6.3
Using mercenary 0.3.5
Using posix-spawn 0.3.11
Using yajl-ruby 1.2.1
Using pygments.rb 0.6.3
Using redcarpet 3.3.2
Using safe_yaml 1.0.4
Using parslet 1.5.0
Using toml 0.1.2
Using jekyll 2.5.3
Using jekyll-sitemap 0.8.1
Using json 1.8.2
Using octopress-deploy 1.2.2
Using octopress-hooks 2.6.1
Using octopress-escape-code 2.0.6
Using titlecase 0.1.1
Using octopress 3.0.0.rc.37
Using octopress-date-format 2.0.2
Using rubypants-unicode 0.2.5
Using octopress-filters 1.3.3
Using octopress-tag-helpers 1.0.4
Using octopress-include-tag 1.1.0
Using uglifier 2.7.1
Using octopress-ink 1.0.0.rc.48
Using octopress-return-tag 1.0.1
Using octopress-feeds 2.0.3
Using octopress-multilingual 1.2.0
Using octopress-paginate 1.1.2
Using rack 1.6.4
Using rack-protection 1.5.3
Using rdiscount 2.1.8
Using sass-globbing 1.0.0
Using sinatra 1.4.6
Using stringex 1.4.0
Using bundler 1.10.6

and configured _config.yml with Italian default language:

gems:
  - octopress-multilingual
lang: it

Setting octopress-multilingual

I've followed the Link between translated posts or pages section and I have sucessfully generated a translation_id for the about page and for a post.

It happens that in the about page:

  • {% translations page %} works as expected (OK)
  • {% translations post %} doesn't print nothing (BAD)

in the italian post /_post/20150727-test.markdown and in the English post:

  • {% translations page %} doesn't print nothing with English post in /en/_posts/20150727-test.markdown (BAD)
  • {% translations page %} doesn't print nothing with English post in /_posts/en/20150727-test.markdown (BAD)
  • {% translations page %} works as expected (OK) with English post in /_posts/20150727-test-with-a-suffix-to-distinguish-from-italian-post.markdown
  • {% translations post %} doesn't print nothing with English post in /en/_posts/20150727-test.markdown (BAD)
  • {% translations post %} doesn't print nothing with English post in /_posts/en/20150727-test.markdown (BAD)
  • {% translations post %} doesn't print nothing with English post in /_posts/20150727-test-with-a-suffix-to-distinguish-from-italian-post.markdown (BAD)

so it seems:

  • {{ translations page }} always works for pages
  • {{ translations page }} works for posts if and only if translated post are in /_posts/ directory
  • {{ translations post }} never works for both pages and posts.

Thanks,
Tarin

@taringamberini
Copy link
Author

I've just deployed my octopress multilingual site at https://taringamberini.github.io and you can find my octopress site sources on the source branch.

In case somebody wanted to reproduce the issued error feel free to test on my sources:

$ git clone https://github.com/taringamberini/taringamberini.github.io.git
$ cd taringamberini.github.io/
$ git checkout source
$ rake generate (or to get more info: jekyll build --trace)
$ rake preview

I'm available for any questions or tests,
Tarin

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

1 participant