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

Add a preview/validation feature for datetime strings #1742

Open
NekoJonez opened this issue Nov 26, 2023 · 2 comments
Open

Add a preview/validation feature for datetime strings #1742

NekoJonez opened this issue Nov 26, 2023 · 2 comments
Labels
[Type] Enhancement A suggestion for improvement.

Comments

@NekoJonez
Copy link
Contributor

In my most recent core tickets, at the time of writing, I helped to improve the comments we see here:

image

Now, we lead translators in that comment to the usual manual page, but what if a translator still gives in a wrong datetime string?
I'd add a feature that if GlotPress finds in the translator comment it's going about a datetime, you have a "validate" button where GlotPress checks if you have a valid datetime. Or a seperate tool for this.

I'm well aware that implementing something like this can easily go out of scope .... but I think it would be cool if we translators have a tool where we can see how our datetime will look and be assured we got the correct one.

@NekoJonez NekoJonez added the [Type] Enhancement A suggestion for improvement. label Nov 26, 2023
@swissspidy
Copy link
Member

Interesting idea.DateTime::createFromFormat() could potentially used for this on the server side.

The main problem is that GP by default simply doesn't know whether a given string is meant to be a date format. It doesn't have that information. So this might be better suited in a WordPress.org-specific plugin (or generally in a plugin) for now.

@NekoJonez
Copy link
Contributor Author

Thats fair, thats why I suggested it being a seperate tool as well. Maybe one of those tabs can be a validator tool with a preview function? Or just a new place in GlotPress itself that is a click away? #Thinkingoutloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

2 participants