Skip to content

menu_displaylist: display releasemonth as a string rather than int#19114

Open
Ar4m1s wants to merge 4 commits into
libretro:masterfrom
Ar4m1s:display-releasemonth
Open

menu_displaylist: display releasemonth as a string rather than int#19114
Ar4m1s wants to merge 4 commits into
libretro:masterfrom
Ar4m1s:display-releasemonth

Conversation

@Ar4m1s

@Ar4m1s Ar4m1s commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Guidelines

  1. Rebase before opening a pull request
  2. If you are sending several unrelated fixes or features, use a branch and a separate pull request for each
  3. If possible try squashing everything in a single commit. This is particularly beneficial in the case of feature merges since it allows easy bisecting when a problem arises
  4. RetroArch codebase follows C89 coding rules for portability across many old platforms check using C89_BUILD=1

Description

Makes it so that when you view database entry information, the releasemonth is displayed as a string and not integer. Meaning instead of "1", it says "January" and so on.

The extra modified lines are from the .editorconfig removing trailing spaces.

  1. Select Game that has releasemonth metadata set.
  2. Press Information
  3. Press Database Entry
  4. See that Release Date Month uses month names instead of numbers.

@Ar4m1s

Ar4m1s commented Jun 16, 2026

Copy link
Copy Markdown
Contributor Author

I just wanted to mention that trying to build master with C89_BUILD=1, returns many errors and warnings. Meaning I can't easily test whether or not my patch uses features beyond C89.

@Ar4m1s Ar4m1s force-pushed the display-releasemonth branch 2 times, most recently from 8ae0580 to 8938163 Compare June 16, 2026 17:52
@s3gfaultx

Copy link
Copy Markdown
Contributor

It might not be sufficient to hard code English only month names.

@Ar4m1s

Ar4m1s commented Jun 23, 2026

Copy link
Copy Markdown
Contributor Author

Is that not what the message hash is for? This is only a fallback afaik. I might be wrong though.

Comment thread menu/menu_displaylist.c Outdated
@sonninnos

Copy link
Copy Markdown
Collaborator

I'd also rather not have month names at all unless they are translated to all languages, and currently lang files do not have month names.. so might as well just use numbers.

@Ar4m1s Ar4m1s force-pushed the display-releasemonth branch from 8938163 to 9f014b6 Compare June 23, 2026 12:45
@Ar4m1s

Ar4m1s commented Jun 23, 2026

Copy link
Copy Markdown
Contributor Author

I'd also rather not have month names at all unless they are translated to all languages, and currently lang files do not have month names.. so might as well just use numbers.

But does not Crowdin fetch from master? I mean it can't have the translations without the feature being merged first right?

@s3gfaultx

Copy link
Copy Markdown
Contributor

But does not Crowdin fetch from master? I mean it can't have the translations without the feature being merged first right?

It will allow you to translate existing MSG_HASH(s), but I don't see any in this PR.

@Ar4m1s

Ar4m1s commented Jun 26, 2026

Copy link
Copy Markdown
Contributor Author

I think I will need an enum value for each month of the year, add it to msg_hash_us.h, and make sure to convert the integer to its enum value.

@Ar4m1s

Ar4m1s commented Jun 26, 2026

Copy link
Copy Markdown
Contributor Author

Should this be something more general, and not specific to this feature? Like should the enum just be MENU_ENUM_LABEL_VALUE_MONTH_JANUARY instead of MENU_ENUM_LABEL_VALUE_RDB_ENTRY_RELEASE_MONTH_JANUARY since translating the month may be useful elsewhere not be needed to be translated multiple times?

@Ar4m1s

Ar4m1s commented Jun 26, 2026

Copy link
Copy Markdown
Contributor Author

I think I added what was necessary for it to be possible to translate. I can squash the commits before merging, but for now the commits serve as useful history.

@s3gfaultx

Copy link
Copy Markdown
Contributor

Should this be something more general, and not specific to this feature? Like should the enum just be MENU_ENUM_LABEL_VALUE_MONTH_JANUARY instead of MENU_ENUM_LABEL_VALUE_RDB_ENTRY_RELEASE_MONTH_JANUARY since translating the month may be useful elsewhere not be needed to be translated multiple times?

I think it's fine to keep the naming scoped to where it will be used. If in the future, someone needs these elsewhere, they can refactor it then.

I think I added what was necessary for it to be possible to translate. I can squash the commits before merging, but for now the commits serve as useful history.

This looks better to me now, thank you.

Comment thread menu/menu_displaylist.c Outdated
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.

3 participants