-
-
Notifications
You must be signed in to change notification settings - Fork 38
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
Multiple regressions in 1.0.2 #251
Comments
Debugging the 1st issue I've found this: mkdocs-static-i18n/mkdocs_static_i18n/reconfigure.py Lines 613 to 615 in cc4f380
The assets from the overrides are only added to the initial build. This triggered a memory of the same thing I fixed in the patch to the refactor, so I dig further: mkdocs-static-i18n/mkdocs_static_i18n/reconfigure.py Lines 508 to 510 in fb4bbf1
You did merge my fix, but later decided to remove it in c2215b2 or perhaps it's a mistake missed because of the amount of changes. With the fix restored, no warnings appear related to those files, and they are correctly resolved in the webpage. I don't understand the rationale of limiting the assets to only the first run. Perhaps performance to not copy the files multiple times? The issue is that MkDocs relies on the I do realize this issue could be also related to other directories, assuming someone uses |
Investigating the 3rd issue, I've confirmed for myself that the default language is closely related to the fallback, especially the default file without any suffix locale is always assumed to be using the default locale. I've tried some things to "revert" the behaviour to the previous way, but I either introduced a bug somewhere else (like for example the alternate switcher also now relies on the extension locale, I think) or the performance got worse. So I've accepted that there needs to be some sort of compromise here between the new and old behaviour. Locally, I've decided to add a global Therefore this global option partially fixes the 2nd and 3rd issues, I've written above. |
@kamilkrzyskow since quite a lot have been done so far, would you be okay to close this PR and open a separate new one for the hopefully last problem you'd like us to solve? |
Sure, I'll edit the OP and move the last issue to a separate issue. |
Suppressed with #262 |
The regressions might have been present in version 1.0.0, but I haven't verified it. I simply used the latest available version. Some of these issues could be intentional (though I hope not). Please consider this a mega-thread of challenges I faced while migrating to the newer version. 😃
Environment:
i18n 1.0.2 plugin config
File structure
https://tree.nathanfriend.io/
Issues:
Relative Path Warnings:
When building subsequent languages, warnings appear for relative paths to the overrides directory (no issues for the default language).
There's only a default language version of the file, and when the Polish version falls back to it, the path doesn't match. This warning wasn't present in plugin version 0.5.6* with MkDocs 1.5.2, although the error was partially there. With my MkDocs configuration using directory paths, the path gets altered with an additional
../
for the default language. In version 0.5.6, the paths in other languages were consistent with the default language. However, in version 1.0.2, they remain as is in the Markdown.Global Parameters:
The previous
default_language
anddefault_language_only
parameters were handy for CI and making swift local development changes using environment variables (GMC_DEFAULT_LANG
,GMC_ONLY_DEFAULT_LANG
). The new config seems to have reversed the behavior, making the default language obligatory. I might be able to work with that, but the subsequent issue is more concerning.Language Toggling Issues:
Given that each language now has an individual toggle for
default
, it's not feasible to set a single environment variable. In addition, swapping the values temporarily (e.g., en <-> pl) is currently not possible due to the existing file structure:The latest version seems to connect
default
withfallback
. This results in a conflict when I aim to useindex.pl.md
as the default, while intendingindex.md
to act as a fallback for the English version. I certainly don't intend to alter the file structure to accommodate files likeindex.en.md
.Build Time Logs:
The output displays individual build times for each build rather than a single cumulative log at the end.
I recall somewhat resolving this to show only the final time log, but maybe MkDocs 1.5 altered the way duplicate filters operate.
These are my primary concerns for now. I'll update this list as I progress further.
*Note: While I did use a modified variant of plugin version 0.5.6, to the best of my recollection, none of the regressions mentioned were connected to those modifications. See modifications here.
The text was updated successfully, but these errors were encountered: