diff --git a/frontend/src/Calendar/CalendarPage.js b/frontend/src/Calendar/CalendarPage.js
index b087be106..c569a6532 100644
--- a/frontend/src/Calendar/CalendarPage.js
+++ b/frontend/src/Calendar/CalendarPage.js
@@ -110,7 +110,7 @@ class CalendarPage extends Component {
- {translate('SslCertPath')}
+ {translate('SSLCertPath')}
- {translate('RssSyncInterval')}
+ {translate('RSSSyncInterval')}
diff --git a/frontend/src/Utilities/String/translate.js b/frontend/src/Utilities/String/translate.js
index 7a3e97e75..01e162512 100644
--- a/frontend/src/Utilities/String/translate.js
+++ b/frontend/src/Utilities/String/translate.js
@@ -9,7 +9,7 @@ function getTranslations() {
dataType: 'json',
url: `${window.Radarr.apiRoot}/localization`,
success: function(data) {
- localization = data.strings;
+ localization = data.Strings;
}
};
@@ -34,6 +34,5 @@ export default function translate(key, args = '') {
});
}
- const formatedKey = key.charAt(0).toLowerCase() + key.slice(1);
- return translations[formatedKey] || key;
+ return translations[key] || key;
}
diff --git a/src/Radarr.Api.V3/Localization/LocalizationModule.cs b/src/Radarr.Api.V3/Localization/LocalizationModule.cs
index 8bebc5de9..1f02559a4 100644
--- a/src/Radarr.Api.V3/Localization/LocalizationModule.cs
+++ b/src/Radarr.Api.V3/Localization/LocalizationModule.cs
@@ -1,3 +1,4 @@
+using Newtonsoft.Json;
using NzbDrone.Core.Localization;
using Radarr.Http;
@@ -11,12 +12,21 @@ namespace Radarr.Api.V3.Localization
{
_localizationService = localizationService;
- GetResourceSingle = GetLocalizationDictionary;
+ Get("/", x => GetLocalizationDictionary());
}
- private LocalizationResource GetLocalizationDictionary()
+ private string GetLocalizationDictionary()
{
- return _localizationService.GetLocalizationDictionary().ToResource();
+ // We don't want camel case for transation strings, create new serializer settings
+ var serializerSettings = new JsonSerializerSettings
+ {
+ DateTimeZoneHandling = DateTimeZoneHandling.Utc,
+ NullValueHandling = NullValueHandling.Ignore,
+ Formatting = Formatting.Indented,
+ DefaultValueHandling = DefaultValueHandling.Include
+ };
+
+ return JsonConvert.SerializeObject(_localizationService.GetLocalizationDictionary().ToResource(), serializerSettings);
}
}
}