-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
1 addition
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18ae08d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I might be over-thinking it, but wouldn't it be better to also have an
else if
to catch the case where you want to load thetranslationFile
and not the (duplicate)translationsFallbackFile
?ie
This seems to work better for me, as otherwise it loads the translations as the fallback file if the two files are the same (which seems to cause problems for the MMM-Voice-Recognition module that I'm using.
18ae08d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In fact, why don't I pop this up as PR...
18ae08d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My recent change would fix the issue of loading twice the same file. The fallback file always needs to be loaded, even if the desired file is loaded as well, because the desired translation file does not always include every translation. In that case it can fall back to a translation of the fallback file.
18ae08d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, right, sorry.
I guess the change is more properly needed in the module, then, to handle the case that the information it's looking for isn't in the translation file?