goatshriek / stumpless

a C logging library built for performance and features
https://goatshriek.github.io/stumpless
Apache License 2.0
446 stars 335 forks source link

implement turkish (tr-TR) localization #388

Closed goatshriek closed 11 months ago

goatshriek commented 12 months ago

There is a detailed guide on how to go about adding a new language in the localization documentation.

If you'd like a concrete example of such a change, check out commit 5529e077eb75c6e79d5634e9d7fc708828b78f89, which shows how to update the various build and header files outlined in the documentation.

OsmanBuyuksar commented 12 months ago

Hi, i added localization for turkish but is there a way for me to test it before making a pull request?

goatshriek commented 12 months ago

The most straightforward way to test is to build similarly to the way the locale tests do. Set the LANG environment variable appropriately, and then run through a build and make sure that your localization is chosen, most easily by checking the setting in include/stumpless/config.h in the build directory. If you want to make absolutely sure, you can temporarily add a stumpless_perror call to one of the empty argument tests and make sure that the correct localized string is printed instead of the default English one.

OsmanBuyuksar commented 12 months ago

Thanks for the help, i ran a build using the command LANG=tr_TR.UTF-8 cmake ../stumpless_tr_translate/stumpless/ and the compile was succesfull. The pull request is: https://github.com/goatshriek/stumpless/pull/389