Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some strings format to weblate #4207

Merged
merged 1 commit into from Dec 7, 2023
Merged

Fix some strings format to weblate #4207

merged 1 commit into from Dec 7, 2023

Conversation

TakWolf
Copy link
Contributor

@TakWolf TakWolf commented Dec 7, 2023

Warning
<<File format ".{0}" doesn't support:
<<
{1}<<      # <----- This
<<You can use ".aseprite" format to keep all this information.
<<Do you want continue with ".{0}" anyway?
||&Yes||&No

to

Warning
<<File format ".{0}" doesn't support:
<<
{1}
<<
<<You can use ".aseprite" format to keep all this information.
<<Do you want continue with ".{0}" anyway?
||&Yes||&No

@TakWolf TakWolf requested a review from dacap as a code owner December 7, 2023 04:52
@TakWolf
Copy link
Contributor Author

TakWolf commented Dec 7, 2023

By the way, where is this set of strings located in the software?
Is it necessary to keep the prefix space?

https://github.com/aseprite/aseprite/blob/d5a54d8de770e4d9752a71018f74af850402298b/data/strings/en.ini#L513C1-L526C27

PaletteEditor = Switch{0}{1}{2}
PaletteEditor_Edit = <<<END
 Edit Palette Mode
END
PaletteEditor_And = <<<END
 and
END
PaletteEditor_FgPopup = <<<END
 Foreground Color Popup
END
PaletteEditor_BgPopup = <<<END
 Background Color Popup
END
PaletteSize = Palette Size
PaletteEditor = Switch{0}{1}{2}
PaletteEditor_Edit = \ Edit Palette Mode
PaletteEditor_And = \ and
PaletteEditor_FgPopup = \ Foreground Color Popup
PaletteEditor_BgPopup = \ Background Color Popup
PaletteSize = Palette Size

@dacap dacap self-assigned this Dec 7, 2023
@dacap
Copy link
Member

dacap commented Dec 7, 2023

Thanks for the PR @TakWolf going to merge it.

By the way, where is this set of strings located in the software?

It's the command name of some special shortcuts (F4 is a historical shortcut from the Allegro Sprite Editor):

image

The code is here:

std::string PaletteEditorCommand::onGetFriendlyName() const
{
std::string edit, plus, popup;
if (m_edit) {
edit = Strings::commands_PaletteEditor_Edit();
}
if (m_edit && m_popup) {
plus = Strings::commands_PaletteEditor_And();
}
if (m_popup) {
if (m_background)
popup = Strings::commands_PaletteEditor_BgPopup();
else
popup = Strings::commands_PaletteEditor_FgPopup();
}
return fmt::format(getBaseFriendlyName(), edit, plus, popup);
}

Is it necessary to keep the prefix space?

Yes, but only because it's a little weird how we are building the final PaletteEditorCommand string (probably difficult to replicate on other languages).

@dacap dacap merged commit f7c830d into aseprite:main Dec 7, 2023
7 checks passed
@TakWolf
Copy link
Contributor Author

TakWolf commented Dec 7, 2023

I got it. Can it be changed to:

PaletteEditor = Switch {0} {1} {2}
PaletteEditor_Edit = Edit Palette Mode
PaletteEditor_And = and
PaletteEditor_FgPopup = Foreground Color Popup
PaletteEditor_BgPopup = Background Color Popup

@TakWolf TakWolf deleted the fix-strings branch December 7, 2023 13:25
@dacap
Copy link
Member

dacap commented Dec 7, 2023

Right now it's not possible, as some whitespaces might be duplicated in the final result. Anyway we could post-process the result replacing " " with " " and trimming trailing spaces. I can made the change as this might simplify all translations.

dacap added a commit that referenced this pull request Dec 7, 2023
@dacap
Copy link
Member

dacap commented Dec 7, 2023

I've made the change 👍

dacap added a commit to aseprite/strings that referenced this pull request Jan 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants