plasmabit / timethings

Show clock, track time spent editing a note, and track the last time a note has been edited.
GNU General Public License v3.0
15 stars 1 forks source link

Language in dataviewjs shows english text instead of german when the plugin is active. #20

Open merlinuwe opened 5 months ago

merlinuwe commented 5 months ago

Thanks for your great plugin.

I found an easily reproducible bug:

I use this dataviewjs snippet:

```dataviewjs
const changed = moment(dv.current().geändert, "LLLL", "de")
const today = moment()
const changed_duration = moment.duration(today - changed)
dv.paragraph("Etwa <i>" + changed_duration.humanize()+"</i> seit der letzten Änderung.")


[dataviewjs - Zeit vergangen seit der letzten Änderung (dt.).md](https://github.com/DynamicPlayerSector/timethings/files/15133653/dataviewjs.-.Zeit.vergangen.seit.der.letzten.Anderung.dt.md)

When your plugin and dataview plugin are _active, I see this:

![image](https://github.com/DynamicPlayerSector/timethings/assets/4138869/c93bb2ea-3eef-47df-a016-626fc979b3a9)

When your plugin is _deactivated_, 

and 

after a restart of obsidian, I see this:

![image](https://github.com/DynamicPlayerSector/timethings/assets/4138869/1c150854-97fe-4003-b9be-0a2bb2bcbb3e)

SYSTEM INFO:
    Obsidian version: v1.5.12
    Installer version: v1.5.12
    Operating system: Windows 10 Home 10.0.19045
    Login status: not logged in
    Insider build toggle: off
    Live preview: off
    Base theme: dark
    Community theme: MagicUser v19.5.0
    Snippets enabled: 25
    Restricted mode: off
    Plugins installed: 143
    Plugins enabled: 1
        1: Dataview v0.5.66
plasmabit commented 5 months ago

Huh. A very weird bug...

Thank you for reporting. As a wild guess, it could be that my plugin somehow changes the locale of the moment.js library. But I don't remember messing with locale variables, or anything like that. Interesting

cor-bee commented 3 weeks ago

Same thing here, got my locale changed because of this bug