I am experiencing strange workings of the dictionary in Sitecore JSS. As mentioned in https://jss.sitecore.net/#/sitecore-net-dev?id=for-sitecore-net-developers, I have created an item of template /sitecore/templates/System/Node under my website and created dictionary entries below and set dictionaryDomain to the id of that item in the app configuration. What I expect to get for the dictionary when I do a call to http://jss-sc.sampleadvancedapp/sitecore/api/jss/dictionary/JssAdvancedApp/en?sc_apikey={API_KEY} is the items below the configured node.
However, what seems to happen is that the keys of the items below the configured node are used to search for entries in the standard dictionary folder of sitecore (/sitecore/system/Dictionary) and if a match is found based on the key, the value of the item in the standard sitecore dictionary is used. If no match is found, then the dictionary entry is returned with the key as it's value.
If I look into the code of: Sitecore.JavaScriptServices.Globalization.Dictionary. TranslationDictionaryReader, this is expectable because of the lines:
string str1 = item["Key"];
string str2 = this.Translate.TextByLanguage(domain.Name, TranslateOptions.Default, str1, language, str1, (object[]) null);
keyValuePairSet.Add(new KeyValuePair<string, string>(str1, str2));
Is this how it is supposed to work? My expectation was that we could create stand-alone dictionaries for the different apps without references to the standard sitecore dictionary.