Skip to content

Commit

Permalink
Enhance user action logging (#3273)
Browse files Browse the repository at this point in the history
  • Loading branch information
ayanaar committed Jul 4, 2024
1 parent 86041d9 commit f1e958d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export function MachineryTranslationComponent({
const isSelected = element === index;

const { llmTranslation } = useLLMTranslation(translation);
const locale = useContext(Locale);

const copyTranslationIntoEditor = useCallback(() => {
if (window.getSelection()?.isCollapsed !== false) {
Expand All @@ -52,6 +53,7 @@ export function MachineryTranslationComponent({
if (llmTranslation) {
logUXAction('LLM Translation Copied', 'LLM Feature Adoption', {
action: 'Copy LLM Translation',
localeCode: locale.code,
});
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export function GoogleTranslation({
await transformLLMTranslation(translation, characteristic, locale.name);
logUXAction('LLM Dropdown Select', 'LLM Feature Adoption', {
optionSelected: characteristic,
targetLanguage: locale.name,
localeCode: locale.code,
});
}
setDropdownOpen(false);
Expand Down

0 comments on commit f1e958d

Please sign in to comment.