On 2/24/25 10:21, Benoit Lobréau wrote:
> On 2/24/25 2:05 AM, Michael Paquier wrote:
>> I think that you have the right idea here, avoiding the duplication
>> of the errdetail() which feels itchy when looking at the patch.
>
> Done this way in the attached patch.
This looks good to me.
>> This should have a note for translators that this field refers to a file
>> name.
>
> Is there a specific way todo this?
If you search the source for translator: you'll find lots of examples.
Here's one that was pretty relevant:
/* translator: %s is a configuration file */
We could probably phrase that as:
/* translator: %s is a backup_label or pg_control file */
That note goes right above the hint, so something like:
+ /* translator: %s is a backup_label or
pg_control file */
+ errdetail("Latest checkpoint in %s is at %X/%X on timeline %u, but
in the history of the requested timeline, the server forked off from
that timeline at %X/%X.",
+ haveBackupLabel ? "backup_label" : "pg_control",
Regards,
-David