feat: Add new virtual categories 'bald' and 'neu', update category handling in renderApp, and enhance translations across multiple locales
This commit is contained in:
@@ -341,6 +341,9 @@ class Content extends Component {
|
||||
|
||||
|
||||
fetchCategoryData(categoryId) {
|
||||
if (categoryId === 'bald') {
|
||||
sessionStorage.setItem('filter_availability', '1');
|
||||
}
|
||||
const currentLanguage = this.props.languageContext?.currentLanguage || this.props.i18n?.language || 'de';
|
||||
const cachedData = getCachedCategoryData(categoryId, currentLanguage);
|
||||
if (cachedData) {
|
||||
@@ -431,6 +434,18 @@ class Content extends Component {
|
||||
} catch (err) {
|
||||
console.error('Error finding category name in tree:', err);
|
||||
}
|
||||
|
||||
if (!enhancedResponse.categoryName && !enhancedResponse.name) {
|
||||
if (categoryId === 'neu') {
|
||||
enhancedResponse.categoryName = this.props.t
|
||||
? this.props.t('navigation.new')
|
||||
: 'Neuheiten';
|
||||
} else if (categoryId === 'bald') {
|
||||
enhancedResponse.categoryName = this.props.t
|
||||
? this.props.t('navigation.soon')
|
||||
: 'Demnächst';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.processData(enhancedResponse);
|
||||
|
||||
Reference in New Issue
Block a user