untra / polyglot

:abc: Multilingual and i18n support tool for Jekyll Blogs
https://polyglot.untra.io
MIT License
410 stars 59 forks source link

exclude_from_localizations is not working for assets folder #162

Closed tkosaka1976 closed 8 months ago

tkosaka1976 commented 2 years ago

Dear @untra

Thank you for your developing this jekyll-plugin "polyglot". This plugin helped me to make multi-language website under my understanding. The application works well but I noticed that the function "exclude_from_localizations" is not working. I found the "assets" folder in the each language folder (eg., en) when I set that in values of "exclude_from_localizations".

I do not clearly understand this problem but "site.static_files" also has problems. #131 I hope this report help to resolve problems.

I'm using jekyll-polyglot (1.5.0), jekyll (4.2.2), bundler (2.3.7), ruby (3.1.2)

untra commented 2 years ago

Hi @tkosaka1976 👋

I'm glad you're finding success with this plugin. Thanks for the report. Can you additionally share your _config.yml and a link to your repo so I can try to replicate the issue?

You twice mentioned the variable as "exclude_from_localizations" with an s when it's actually "exclude_from_localization". Spelling is important here and the typo could explain the behavior you're seeing.

tkosaka1976 commented 2 years ago

Dear @untra

Thank you for your response. I'll try to confirm that in a new test site, I'll try and if I found that I'll share it with you. Please wait.

tkosaka1976 commented 2 years ago

I made a repository testcode-jekyll-polyglot I found that if we use theme "minima" then the "assets" problem happen. This phenomena is not same as my previously encounterd situation, but that like results also happen. I knew that if we remove the theme then the function "exclude_from_localizations" works. Sorry, I cannot share my real repository (personal reason). If you need more information, please ask me.

untra commented 2 years ago

@tkosaka1976 I think this is whats going on here: https://github.com/untra/polyglot/issues/132#issuecomment-808810772

You have two workarounds here:

  • create those files exactly as they are now in the site build output directory, and just be cool with those extra files hanging around not being recreated
  • just don't use the minima gem with your project

Sorry for any confusion, this is a known conflict between the polyglot and minima gems. I'll be sure to document this further.

tkosaka1976 commented 2 years ago

I see. I understand. Anyway, the function "exclude_from_localizations" has limitations and conflicts with other plug-ins. This is probably caused by "assets" folder handling. If I get another information, I'll report. I'll remove these folders directly by myself before deployment.

Thank you for your help and development!