Skip to content

Commit

Permalink
UI beautification.
Browse files Browse the repository at this point in the history
German i18n added some more strings.
  • Loading branch information
bmachek committed Oct 7, 2024
1 parent 451efd9 commit 633db64
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 30 deletions.
79 changes: 52 additions & 27 deletions lrc-ai-assistant.lrplugin/GenerateImageInfo.lua
Original file line number Diff line number Diff line change
Expand Up @@ -48,45 +48,70 @@ local function showUsedTokensDialog(totalInputTokens, totalOutputTokens)
local totalCosts = inputCosts + outputCosts
-- LrDialogs.message(LOC("$$$/lrc-ai-assistant/GenerateImageInfo/UsedTokens=Used tokens during process\nInput tokens: ^1 (USD ^3)\nOutput tokens: ^2 (USD ^4)\nTotal costs: USD ^5", totalInputTokens, totalOutputTokens, inputCosts, outputCosts, totalCosts))
local f = LrView.osFactory()
local share = LrView.share
local dialog = {}
dialog.title = LOC "$$$/lrc-ai-assistant/GenerateImageInfo/UsedTokenDialog/Title=Generation costs"
dialog.resizable = false
dialog.contents = f:column {
f:row {
f:static_text {
title = LOC "$$$/lrc-ai-assistant/GenerateImageInfo/UsedTokensDialog/UsedTokens=Used Tokens",
size = "small",
f:column {
f:group_box {
title = LOC "$$$/lrc-ai-assistant/GenerateImageInfo/UsedTokenDialog/UsedTokens=Used Tokens",
f:spacer {
width = share 'spacerWidth',
},
f:static_text {
title = 'Input:',
font = "<system/bold>",
},
f:static_text {
title = tostring(totalInputTokens),
width = share 'valWidth',
},
f:static_text {
title = 'Output:',
font = "<system/bold>",
},
f:static_text {
title = tostring(totalOutputTokens),
width = share 'valWidth',
},
},
},
f:static_text {
title = 'Input:'
},
f:static_text {
title = tostring(totalInputTokens),
},
f:static_text {
title = 'Output:'
},
f:static_text {
title = tostring(totalOutputTokens),
f:column {
size = "small",
f:group_box {
title = LOC "$$$/lrc-ai-assistant/GenerateImageInfo/UsedTokenDialog/GeneratedCosts=Generated costs",
f:spacer {
width = share 'spacerWidth',
},
f:static_text {
title = 'Input:',
font = "<system/bold>",
},
f:static_text {
title = tostring(inputCosts) .. " USD",
width = share 'valWidth',
},
f:static_text {
title = 'Output:',
font = "<system/bold>",
},
f:static_text {
title = tostring(outputCosts) .. " USD",
width = share 'valWidth',
},
},
},
},
f:row {
f:static_text {
title = LOC "$$$/lrc-ai-assistant/GenerateImageInfo/UsedTokensDialog/GeneratedCosts=Generated costs"
},
f:static_text {
title = 'Input:'
},
f:static_text {
title = tostring(inputCosts) .. " USD",
},
f:static_text {
title = 'Output:'
},
f:static_text {
title = tostring(outputCosts) .. " USD",
f:spacer {
height = 20,
},
},
f:row {
font = "<system/bold>",
f:static_text {
title = LOC "$$$/lrc-ai-assistant/GenerateImageInfo/UsedTokenDialog/TotalCosts=Total costs:",
},
Expand Down
8 changes: 5 additions & 3 deletions lrc-ai-assistant.lrplugin/TranslatedStrings_de.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,12 @@
"$$$/lrc-ai-assistant/GenerateImageInfo/saveTopKeyword=KI-generierte Stichwörter speichern."
"$$$/lrc-ai-assistant/GenerateImageInfo/caption=Analysiere Foto mit ^1. Bild ^2/^3"
"$$$/lrc-ai-assistant/GenerateImageInfo/analyzeFailed=Fehler beim Analysieren mit ^1"
"$$$/lrc-ai-assistant/GenerateImageInfo/UsedTokensDialog/Title=Verursachte Kosten"
"$$$/lrc-ai-assistant/GenerateImageInfo/UsedTokensDialog/UsedTokens=Verbrauchte Tokens"
"$$$/lrc-ai-assistant/GenerateImageInfo/UsedTokensDialog/GeneratedCosts=Erzeugte Kosten"

"$$$/lrc-ai-assistant/GenerateImageInfo/UsedTokenDialog/Title=Verursachte Kosten"
"$$$/lrc-ai-assistant/GenerateImageInfo/UsedTokenDialog/UsedTokens=Verbrauchte Tokens"
"$$$/lrc-ai-assistant/GenerateImageInfo/UsedTokenDialog/GeneratedCosts=Erzeugte Kosten"
"$$$/lrc-ai-assistant/GenerateImageInfo/UsedTokenDialog/TotalCosts=Kosten insgesamt"

"$$$/lrc-ai-assistant/GenerateImageInfo/SkipFromHere=Die folgenden ohne Überprüfung speichern."
"$$$/lrc-ai-assistant/GenerateImageInfo/fatalError=Schwerwiegender Fehler: Analyse abgebrochen. Bitte Logdatei überprüfen."
"$$$/lrc-ai-assistant/GenerateImageInfo/failedPhotos=Fehlgeschlagene Fotos\n^1"
Expand Down

0 comments on commit 633db64

Please sign in to comment.