Skip to content

Commit

Permalink
add world translation strings
Browse files Browse the repository at this point in the history
  • Loading branch information
DeDiamondPro committed Oct 3, 2024
1 parent b5b8129 commit a321308
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion category-localizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ async function fetchAndProcessData() {
const curseForgeData = await fetchData('https://api.curseforge.com/v1/categories?gameId=432', {'x-api-key': 'cf-api-key'});
const translationIndexes = [];
curseForgeData.data.forEach(item => {
if (![12, 6552].includes(item.classId)) return;
if (![12, 17, 6552].includes(item.classId)) return;
let category = `"resourcify.categories.${item.name.toLowerCase().replaceAll(" ", "_")}": "${capitalizeWords(item.name)}",`
if (!translationIndexes.includes(category) && !modrinthIndexes.includes(category)) {
translationIndexes.push(category);
Expand Down
9 changes: 8 additions & 1 deletion src/main/resources/assets/resourcify/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"resourcify.type.resource_packs": "resource packs",
"resourcify.type.data_packs": "data packs",
"resourcify.type.shaders": "shaders",
"resourcify.type.world": "worlds",

"resourcify.browse.search": "Search %s...",
"resourcify.browse.sort.relevance": "Relevance",
Expand Down Expand Up @@ -137,5 +138,11 @@
"resourcify.categories.photo_realistic": "Photo Realistic",
"resourcify.categories.font_packs": "Font Packs",
"resourcify.categories.vanilla": "Vanilla",
"resourcify.categories.medieval": "Medieval"
"resourcify.categories.medieval": "Medieval",
"resourcify.categories.game_map": "Game Map",
"resourcify.categories.survival": "Survival",
"resourcify.categories.parkour": "Parkour",
"resourcify.categories.creation": "Creation",
"resourcify.categories.puzzle": "Puzzle",
"resourcify.categories.modded_world": "Modded World"
}

0 comments on commit a321308

Please sign in to comment.