sillsdev / web-languageforge

Language Forge: Online Collaborative Dictionary Building on the Web and Phone.
https://languageforge.org
MIT License
44 stars 29 forks source link

update labels to be more consistent with FLEx #1730

Open megahirt opened 1 year ago

megahirt commented 1 year ago

This card is about changing the labels the user sees for the "word" and "meaning" fields.

Word -> Lexeme Form (or "Lexeme" - need clarification) Meaning -> Sense

hahn-kev commented 1 year ago

Reopening this because #1731 only changed the labels for new entries, not existing ones. Here's the conversation from slack:

Tim:

So...I believe we store the names of fields in Mongo, meaning the field renaming @Billy Clark did only applies to new projects. That's not what we were expecting is it? :disappointed:

Billy:

looks like Meaning changed to Sense at least

Kevin:

Sad news, the field names are also in lf merge. here, it looks like it's only used for an empty option list, I'm not totally sure what that means, but I think it means that we can't use lf merge to just update all the labels for us after we make the change. So at this point I'm not sure what the best direction to take would be, I'm worried that stuff might break due to how invasive this change already is.What if we took a different approach and used a custom filter in angular. The only code we change would be in angular. The filter just looks at the input label and maps it to a different value via a lookup and if it's not there then it just uses the label passed in. Something like this:

let lookup = {
"Part of Speech": "Grammatical Category"
}
function convertLabel(label) {
return lookup[label] ?? label;
}

there would be a lot of places where we would have to make the change, and there's some other places like dialogs we would still have to change, but Billy already did that.