Conversation
Will be needed when NStackSDK uses updateOptions .never
|
Why introduce a new variable instead of just checking the Are there scenarios I'm missing where this wouldn't be enough? |
|
@johsoe you're not wrong 😄 The thing is that the So...in the NStackSDK project I had to make a change as well to use That change will be covered by another PR in the NStackSDK project but for the complete picture, here is how I call |
|
Oh hey...sorry, I misread. You said I was considering that but And truth be told I wasn't sure if I could squeeze in another value without side effects. I can take another swing at this. Seems we only use |
and introduces new updateMode enum value instead
|
There we go, updated |
What is This?
This is a continuation of the discussion we had on Slack yesterday related to NStack and what to do when you
.neverwant to update your translations.The problem seemed to be that we always automatically always go straight for the persisted data first in
createLocalizationObjectbefore we attempt a fallback to the JSON file with translations in the app.This works fine if you automatically fetch and save/persist new content from NStack but it doesn't catch new updates if you insist on
.neverupdating your translations. That means that if you add new translations to the JSON file, they won't be detected since the old/persisted data is used...and that doesn't contain the new translations.The Fix
So...this is part of a two step rocket. One part here and one in the NStackSDK project.
In this project we now allow outsiders (that means you NStackSDK) to say "you know what...I don't want to look up the
lookupPersistedLocalizationsfirst, lemme go straight to the JSON file".This property has a default value of true to minimize the damage in code already using the function.
With that in place, we can now use this from the NStackSDK to actually skip looking for persisted data...but that is the topic for a future PR in that repo 😄
Furthermore
I "fixed" some of the failing tests (15 out of 33 tests were failing in the
developbranch before I touched anything 😊 )Still have 3 failing test but I'm too stupid to fix them so....knock yourself out guys 😄