UI: Actions Menu (Part 2 of 4) → XCI Trimmer #146
No reviewers
Labels
No labels
audio
bug
confirmed
cpu
critical
development
enhancement
gpu
graphics-backend:opengl
graphics-backend:vulkan
gui
help wanted
horizon/hle
i18n
infra
input
kernel
linux
macos
suggestion
windows
No assignees
2 participants
Notifications
Due date
No due date set.
Reference
projects/Ryubing!146
Loading…
Reference in a new issue
No description provided.
Delete branch "Neo/Ryubing:ui-actions-xci-trimmer"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Ayyyy, welcome to the UI: Actions Menu → XCI Trimmer PR!
Let's keep it up!
This is the second PR in a series aimed at delivering the largest overhaul and improvements to the
Actionsmenu yet.This second PR introduces visual improvements to the
XCI Trimmerand also fixes some bugs.GENERAL:
XCI Trimmerfiles to use the capitalised XCI instead of XciLOCALISATION:
Common_Search.json- search-related localesCommon_Sort.json- sorting fields, ascending/descending localesDialog_XCITrimmer.json- XCI trimmer dialogsGameListContextMenu.json- all UI dialogs related to the game list menu (right-click game)XCITrimmer.json- all UI-related locales for the XCI Trimmer windowStatusBar.jsonSimulate Wake-Up MessagetoMenuBar_Actions.json(previously did not exist there, for some reason).NOTE:
Common_Search.jsonandCommon_Sort.jsonwere not fully populated, but many more locales will be added and cleaned up in future PRs.XCI TRIMMER:
Trim XCI Filesmenu →XCI TrimmerXCI File Trimmer→XCI TrimmerX of Y Title(s) Selected→XCI Selected: X/YZ Displayedwas renamed toDisplayed: Zand, as usual, appears only when searching for particular XCIs in the search bar.Select Showncontinuously would increment the amount of XCIs selected to infinity (e.g. if 5 XCIs are in the list, then you could get 1201312 of 5 Title(s) Selected). Furthermore, when you were trimming a specific number of XCIs (not the all XCIs) at once, it would show that its trimming all titles from the list (e.g. "Trimming 5 Titles" when only 1 was being trimmed).Select ShownandDeselect Shown. Initially, they were renamed toSelect AllandDeselect All, as that sounded more natural. However, after further consideration, they were both removed and replaced by a single button, whose action and label would change depending on the state it was in:Select AllClear SelectionClear Selectionwas used instead of Deselect All, because some translations were quite awkward.Potential Savings" andActual Savings, the bottom row now shows the amountSavedAND the amountRemaining.GAME LIST CONTEXT MENU (Right-Click Game):
Check & Trim XCI File→Trim XCITrim XCITooltipTrim XCITrim XCIfor every single game (NSP, NSO, etc.), it will only be displayed for XCIs (as they are the only ones that can be trimmed). It is still enabled only if an XCI is untrimmed.Trim XCIDialogSTATUS BAR:
If there are any features or changes that you wish to be implemented, please comment down below and I'll be happy to accommodate!
ee36833ac6c9192a9714Looks good, as always, Neo! Just a couple of questions and nitpicks, and a suggestion: do you think it would make more sense for the view to contain checkboxes for the listed XCI titles to select/deselect? I like the x's and checkmarks, but from a user perspective, I think a checkbox would be more intuitive.
@ -27,3 +27,3 @@internal class TrimmerWindow : Ryujinx.Common.Logging.XCIFileTrimmerLog{private readonly XciTrimmerViewModel _viewModel;private readonly XCITrimmerViewModel _viewModel;We should probably discuss with the other contributors whether we want to strictly enforce PascalCase for names with abbreviations in them. Personally speaking, I'm fine with setting abbreviations as their correct capital variants, but in many cases around the codebase, we use strict PascalCase where we use PascalCase.
True. I changed it because I kept seeing inconsistencies and when I was searching for the files, I'd get inconsistent search results sometimes. I believe for abbreviations, such as XCI or DLC, they should as you described - capital variants, but only for those references, since it's not the "word", but "a bunch of words" together.
I can revert it here if required. Just let me know!
i think its fine for now, we can have a discussion later about it with the team
@ -12,3 +12,3 @@internal class XCITrimmerFileSpaceSavingsConverter : IValueConverter{private const long _bytesPerMB = 1024 * 1024;private const long BytesPerMB = 1024 * 1024;this is a class member -- even if its internal, we should stick to using
_as a prefix for the file nameHmm, the underscore disappeared...reverted!
@ -35,2 +58,3 @@{return LocaleManager.Instance.UpdateAndGetDynamicValue(LocaleKeys.TitleXCICanSaveLabel, ((app.PotentialSavingsB - app.CurrentSavingsB) / _bytesPerMB).CoerceAtLeast(0));return LocaleManager.Instance.UpdateAndGetDynamicValue(LocaleKeys.XCITrimmer_CalculatedSavingsLabel, mb, roundedPercentage);I noticed that your screenshot for the percentages use
,for the separation between integers and decimal amounts. In American English, these are presented with.instead, and I'm sure this is different in other languages as well. Does your code handle this? If not, we may need to consider developing a formatter (or using a library) for this.I did notice this inconsistency beforehand in Settings > Input, where I'd get a commas instead of periods for the sliders, but looking around a bit, it looked like a stylistic choice and not something determined by the computer (since I have it set to periods on my computer). I did once try manually setting it to a period, and did get periods throughout all instances.
Do you see periods instead of commas on your side?
I'm all for setting up a formatter for this, and it has been on my list, but I did not implement anything here because it concerns Ryujinx-wide styling preferences, which are better suited for a PR in the settings, either for Interface (styling) or Input (since that's where most of such values exist) PRs.
looks good to me. idk whats handling that, we should probably figure that out lmao
@ -2352,3 +2354,3 @@LocaleManager.Instance[LocaleKeys.Continue],LocaleManager.Instance[LocaleKeys.Cancel],LocaleManager.Instance[LocaleKeys.GameListContextMenuTrimXCI]LocaleManager.Instance[LocaleKeys.GameListContextMenu_TrimXCIButton]I've noticed this with quite a few of your recent locale changes; do you prefer using
Module_StringNamefor your string names? If so, we can discuss changing this in the updated guidelines with other contributors. I think it makes sense, given thatModuleStringNameis a bit difficult to parse at a glance with our current system.For locales, since the initial implementation of "fracturing", it works by referencing a "file". By default, it references
Root.json, so any locale added there would be immediately "understood" by the system and referenced properly.If we are fracturing it into multiple files, then the underscore typically references the name of the file. In this case, the file in which I moved it to is
GameListContextMenu.json, and theStringNameisTrimXCIButton, so together we get:GameListContextMenu_TrimXCIButton. The string is not located in theRoot.jsonanymore.I do believe it'd be beneficial to use an underscore either way, since it definitely helps readability and parsing through hundreds of locales in .axaml files.
I'm still thinking about what would be best approach, as I'm see how existing strings are structured. Right now, I'm using
FileName_NamePurposeor sometimes it'sClassification_FileName_NamePurpose, like Common_Sort.json. Perhaps in the future I'll remove "Purpose", but I need more information on other locales. I would propose (and am willing to write) the updated guidelines once I get more locales fractured.id like to discuss with a few other translators before we make any definitive decisions regarding the locales, but ill likely consult you for guidelines guidance
Hi sh0! I replied to the other comments as well.
I believe I need to add more images for you to see, but the checkmarks and Xs don't show the selection state, but the trim state (i.e. checkmark if Trimmed, X if untrimmed). I've added more images to the show the different states. I opted for a checkmark for trimmed and X for untrimmed because it's the most simplest binary understanding of the status of the file.
I removed the actual string labels from the list because in many translations, there was no consistent column size that would look good in every single language (and I test this, yes). You can nonetheless hover about the icon to reveal its status.
(Already added the images, they are above!)
56e4e68011daf0cf58c7