-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #51 from performant-software/RB-bug-fixes
Debugging the map search further
- Loading branch information
Showing
26 changed files
with
2,001 additions
and
138 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
{ | ||
"recommendations": ["astro-build.astro-vscode"], | ||
"recommendations": [ | ||
"astro-build.astro-vscode", | ||
"inlang.vs-code-extension" | ||
], | ||
"unwantedRecommendations": [] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
const fs = require('fs'); | ||
|
||
const getFields = async () => { | ||
const coreDataPayload = await fetch('https://core-data-cloud-staging-2c51db0617a5.herokuapp.com/core_data/public/projects/24/descriptors').then((res) => { | ||
return res.json(); | ||
}); | ||
let coreDataFields = ''; | ||
let enJson = {}; | ||
coreDataPayload && coreDataPayload.descriptors && coreDataPayload.descriptors.forEach((field, idx) => { | ||
const label = `${field?.context ? `${field.context} -> ` : ''}${field.label}`; | ||
coreDataFields += `${idx > 0 ? ',\n\t': '\t'}"${field.identifier}": {\n\t\tcaption: m.${`t_${field.identifier.replaceAll('-', '').replaceAll(' ', '')}`}(),\n\t\ttinaLabel: "${label}"\n\t}`; | ||
enJson[`t_${field.identifier.replaceAll('-', '').replaceAll(' ', '')}`] = field.label; | ||
}) | ||
// create new user defined field config file | ||
const userDefinedFields = `import * as m from "../paraglide/messages.js";\n\nconst userDefinedFields = {\n${coreDataFields}\n}\n\nexport default userDefinedFields;` | ||
fs.writeFileSync('./src/i18n/userDefinedFields.ts', userDefinedFields); | ||
console.log('New userDefinedFields file created!'); | ||
|
||
// put initial English values in | ||
let en = JSON.parse(fs.readFileSync('./content/ui/en.json', 'utf8')); | ||
Object.keys(enJson).forEach((key) => { | ||
if (!Object.keys(en).includes(key)) { | ||
en[key] = enJson[key]; | ||
} | ||
}); | ||
fs.writeFileSync('./content/ui/en.json', JSON.stringify(en, null, '\t')); | ||
console.log('Default English values populated!'); | ||
} | ||
|
||
getFields(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"t_map": "Map", | ||
"t_home": "Home", | ||
"t_about": "About", | ||
"t_paths": "Paths", | ||
"t_posts": "Posts", | ||
"t_title": "Name", | ||
"t_root": "Places", | ||
"t_b1e5fbf908034e398810d252eeb1b714": "Places", | ||
"t_988645ac54c54de7aa827c1f8489036c": "Address", | ||
"t_e86ea9bfb8e9407eb1f6dadf9318bc5a": "People", | ||
"t_a2932c3c4257453197ffe810bee2bb93": "Nickname", | ||
"t_8fb6371fcb7c4a048365804336a0e8c1": "Organizations", | ||
"t_99848f101acd41b3a79c1253735b6498": "Dates", | ||
"t_cb28be8a29664899a688fc193e4cd1f3": "Archives", | ||
"t_4706a19055fa4c6aa122b1fbeadf831f": "Notes", | ||
"t_8e1f898712dd46e0a413fdbce695a665": "OCLC NO", | ||
"t_443682f46eb14682a52572a7e887787d": "Libraries", | ||
"t_0eaeca10fcb04d46961e132f4c6c9694": "Photos", | ||
"t_c083228a547249528bf5170ca9564dd2": "Poems", | ||
"t_7a6901c7d6084a5cb984b272cf436f7e": "Events", | ||
"t_44c190bfa51a451db5f6f72710916816": "Editor", | ||
"t_253bfff8ccb3467cb7249082c1130ad4": "Publisher", | ||
"t_a15ae785173b4c95aeb5bf9aeb8b4252": "Contributor", | ||
"t_83f862f6f23145f79bc166ef8c2eeaf3": "Organization", | ||
"t_db766f684e574016b3a37ba76ea1b215": "Landscapes", | ||
"t_c969f66cf9b04305aeda0e2768397f0a": "Author", | ||
"t_e0f9145da27445149ffd49ac1945fe4b": "Event Locations" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"$schema": "https://inlang.com/schema/inlang-message-format" | ||
} |
Oops, something went wrong.