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

I18n bug: files with duplicate names are overwriten during extracting vue files #5122

Closed
2 of 5 tasks
freesrz93 opened this issue Apr 24, 2024 · 2 comments
Closed
2 of 5 tasks
Labels
bug A bug that affects the functionality of Zettlr.

Comments

@freesrz93
Copy link
Contributor

Description

const script = match[1]
const basename = path.basename(absPath) + '.ts'
const outPath = path.join(OUTDIR, basename)
fs.writeFileSync(outPath, script, 'utf-8')

I noticed the path.basename here which caused ALL VUE files are extracted to LEVEL 1 of source/tmp. So files like source/**/App.vue will be extracted to the same target, and only the last one remained. That caused a lack of msgid in static/i18n.pot

Reproducing

e.g. Just search for advanced in i18n.pot and there's not a msgid matching it.

Zettlr Version

Right off the develop branch

Specify version

No response

Installation Method

None

Your Platform

  • Windows
  • macOS
  • Linux

Architecture

  • Intel 64bit
  • ARM 64bit

Operating System Version

Windows 11

Additional Information

No response

@freesrz93 freesrz93 added the bug A bug that affects the functionality of Zettlr. label Apr 24, 2024
Copy link

boring-cyborg bot commented Apr 24, 2024

Thanks so much for opening up your first issue here on the repository! 🎉
We would like to warmly welcome you to the community behind the app! ☺️
We'll check in soon and have a look at your issue. In the meantime, you can
check your issue and make sure it aligns with our contribution guidelines!
Here's the comprehensive list:

NOTE: Please do not share screen captures of buggy behavior on YouTube.
If you have uploaded a video on YouTube and linked it already, don't
worry! But, we would like to ask you to remove the video from YouTube
and upload it directly to GitHub instead, by editing your comment.
Read more here.

Enhancements

An enhancement takes a feature and improves or alters its behaviour. Please
make sure to argue how your proposition will aid non-technical text workers,
and why it can't be emulated easily with other features or apps!

Feature requests

Feature requests introduce whole new features into the app. This requires a
lot of work, so these might be turned down if the implementation costs
supersede the benefits we expect to see from implementing it. Please do not
be disappointed if that happens. It likely has nothing to do with your great
request but simply with us and our missing resources!

You can of course always ask someone to implement this feature, because a PR
with a working new feature has much higher chances of being merged! :)

Bug reports

Please note that one of the main reasons for why bug reports cannot be
addressed is that there's not enough information for us to find and fix the
bug you describe, so make sure you try to pinpoint the bug as close as
possible.

The ideal bug report for us has two qualities:

  1. The bug is always reproducible, at least within a certain context.
  2. We know exactly what specifically goes wrong, and there is consensus on
    what should happen instead.

Please note that if you encounter behaviour that does not align with your
expectations of what would happen, this might as well be simply intended
behaviour and we need to simply clarify why the behaviour is the way it is.
This is not to be considered a bug and such issues may be closed! Suggest an
enhancement instead!

But now, have a great day and thank you again!

@nathanlesage
Copy link
Member

Good catch!

Wei-whey-way added a commit to khksamuel/Zettlr that referenced this issue May 7, 2024
* chore: Add Sponsors link

* fix: Autocorrect entries

Fixes Zettlr#4961

* fix: i18n process

* No more file name/message duplication
* Retain relative Vue-path for better file identification in PO files
* Improved extraction regex to properly extract script tags
* Add a run of msguniq over each file to remove potential duplicates

Fixes Zettlr#5122

* fix: Re-run i18n extraction script to fix loads of duplications and other issues

* chore: Update changelog

* chore: Fix German (de-DE) translation

* chore: Bump version to 3.1.0-beta.3

* chore: Fix spelling in Changelog

* Update CITATION.cff

* fix: Improve logging in event merger

* fix: Weird bug in Nextcloud

* Update CITATION.cff

* fix: Prevent applying illogical updates on file trees

* refactor: Improve types

* chore: Bump Codemirror dependencies to newest versions

* chore: Bump Electron to v30.0.1

* chore: Upgrade ESLint and fix new linter errors

* chore: Bump eslint dependencies

* chore: Upgrade a last set of dependencies

* chore: Bump remark deps

* chore: Clean up CHANGELOG, Electron to 30.0.2

* chore: Bump Electron 30.0.1 -> 3.0.2

* chore: Bump version to 3.1.0; update changelog

* Update CITATION.cff

* chore: Add missing paragraph to changelog

* chore: Bump version to 3.1.0; update changelog

* chore: Add missing paragraph to changelog

* chore: Downgrade Electron to 29.3.2

See issue Zettlr#5135

* chore: Fix changelog

* chore: Bump version to 3.1.1

* chore(citeproc): Update CSL files

* Update CITATION.cff

---------

Co-authored-by: Hendrik Erz <hendrik@zettlr.com>
Co-authored-by: GitHub Action <action@github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug that affects the functionality of Zettlr.
Projects
Status: Done
Development

No branches or pull requests

2 participants