Re: [Printing-architecture] PAPPL 1.2.0

Michael Sweet <[email protected]>
Newsgroups dev.linux.lists.printing-architecture
Message-ID <[email protected]>
Till,

You will need to maintain a single strings file for each language that is localized, among all of the added printers.  Then make sure to remove any existing resource file before re-adding it, otherwise the resource will not be added:

    // Update LOCALE.strings file
    papplSystemRemoveResource(system, "/LOCALE.strings");
    papplSystemAddStringsData/File(system, "/LOCALE.strings", "LOCALE", ...);

I've been working on a new StringsUtil library and utility project that can be used to manipulate .strings files more easily - it's what I've used to localize PAPPL and will be using for libcups3 as well:

    https://github.com/michaelrsweet/stringsutil

I'm in the process of moving the .strings file save functionality out of the utility and into the library, at which point it should do everything you need it to do to dynamically maintain a set of .strings files.


> On May 15, 2022, at 10:40 AM, Till Kamppeter <[email protected]> wrote:
> 
> On 15/05/2022 15:57, Michael Sweet wrote:
>> Till,
>> You need to create a .strings file of the form:
>>     "optionname" = "localized text";
>>     "optionname.choicename" = "localized text";
>> Add these resources in your system callback with papplSystemAddStringsData/File.
> 
> Can I set this dynamically while the Printer Application is running? This way I can create it when I set up a printer and read the PPD file I have assigned to it. I do not want to have to pre-build this for ~4000 PPD files and this way blow up the size of the Snap. And there is also the function for users to load their own PostScript PPD files.
> 
>   Till
> 

________________________
Michael Sweet
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEkIbDzcZsP1Y8+PQFvmfHXsgfMkQFAmKBH14ACgkQvmfHXsgf
MkTnNBAAnfa0kIEY3HByaG64E0/eADyJvhCzNDsIe/BLtKln8v6PMbEk8M6PHPI/
FOGg5rMYXERorDbRAJa4px/ve3QD8Jh7DNGabQaxHibL/SkuOU/W/NH+mKWYHpws
4xeXSV58f95XAU7zVG66mI7ApHHxPioNndlKzcSoJsLDHfjtNU74dJb8TxlGP+4P
cjudWjvvXYbQOdhnrqR5RJaTCZ1SN1jZNUu3ZFggiBmh3QSsij8sOb/BLs4wj9tZ
ve9fTRZcMAgfi9sWRB6iag8PJCahi5Hy8JbmvuTROPEM6VUn8WjlnuhsRljlXALX
9YdBNLWgdS7KUGB/UmbBNo/tjzOfRRxCLE8rVaeZGRWqoFBLtX4sy+BS0nciej6v
u2vYsIfIDTIqZwLmPa+flvRChoiptlUCVSQUg5H0Fs885n1NX/w5rW3n2Z9SLrxI
K1aPFZpXa1lGHWhmygkrHfnEd/7iYIKhgfDzSCDb0XkTuxRNbvwZ5GsXOah8qEP1
qzIonyY31f4/1wDPGxuCiDGJtyJ9yEyKo4Rb0Ch+Gk9lHjWRed3B1Gw+1mtt5sFG
jsQ0QxBex2mW6y0ZqiDk8lp0J5yhO3mDSQkLDY49Z/xDN95hUGzKmizTLKLaORvv
V6F79AZG/xMmavR+BXhryk39PRxZGiFriRUIrRlIWTOzw2iryfM=
=n/8v
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.