Update TR* to B_TRANSLATE. relates to #5408. To note, prior to this changset,

this was not building. See #5927 for more information.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36732 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Matt Madia 2010-05-07 19:43:30 +00:00
parent 0ff73fbfd1
commit 483e12623e
3 changed files with 23 additions and 23 deletions

View File

@ -95,7 +95,7 @@ CatalogSpeed::TestLookup()
watch.Reset(); watch.Reset();
watch.Resume(); watch.Resume();
for (uint32 i = 0; i < kNumStrings; i++) { for (uint32 i = 0; i < kNumStrings; i++) {
translated = TR(strs[i].String()); translated = B_TRANSLATE(strs[i].String());
} }
watch.Suspend(); watch.Suspend();
printf("\tlooked up %lu strings in %9Ld usecs\n", printf("\tlooked up %lu strings in %9Ld usecs\n",
@ -161,7 +161,7 @@ CatalogSpeed::TestIdLookup()
watch.Reset(); watch.Reset();
watch.Resume(); watch.Resume();
for (uint32 i = 0; i < kNumStrings; i++) { for (uint32 i = 0; i < kNumStrings; i++) {
translated = TR_ID(i); translated = B_TRANSLATE_ID(i);
} }
watch.Suspend(); watch.Suspend();
printf("\tlooked up %lu strings in %9Ld usecs\n", printf("\tlooked up %lu strings in %9Ld usecs\n",

View File

@ -124,27 +124,27 @@ CatalogTest::Check()
assert(res == B_OK); assert(res == B_OK);
// now check strings: // now check strings:
s = TR_ID(hashVal); s = B_TRANSLATE_ID(hashVal);
assert(s == "Schnur_id"); assert(s == "Schnur_id");
s = TR_ALL("string", "programming", ""); s = B_TRANSLATE_ALL("string", "programming", "");
assert(s == "String"); assert(s == "String");
s = TR_ALL("string", "programming", "Deutsches Fachbuch"); s = B_TRANSLATE_ALL("string", "programming", "Deutsches Fachbuch");
assert(s == "Textpuffer"); assert(s == "Textpuffer");
s = TR_CMT("string", "Deutsches Fachbuch"); s = B_TRANSLATE_COMMENT("string", "Deutsches Fachbuch");
assert(s == "Leine"); assert(s == "Leine");
// the following string should be found in the embedded catalog only: // the following string should be found in the embedded catalog only:
s = TR_ALL("string", "base", NULL); s = B_TRANSLATE_ALL("string", "base", NULL);
assert(s == "string"); assert(s == "string");
// the following id should be found in the embedded catalog only: // the following id should be found in the embedded catalog only:
s = TR_ID(32); s = B_TRANSLATE_ID(32);
assert(s == "hashed string"); assert(s == "hashed string");
// the following id doesn't exist anywhere (hopefully): // the following id doesn't exist anywhere (hopefully):
s = TR_ID(-1); s = B_TRANSLATE_ID(-1);
assert(s == ""); assert(s == "");
// the following string exists twice, in the embedded as well as in the // the following string exists twice, in the embedded as well as in the
// external catalog. So we should get the external translation (as it should // external catalog. So we should get the external translation (as it should
// override the embedded one): // override the embedded one):
s = TR("string"); s = B_TRANSLATE("string");
assert(s == "Schnur"); assert(s == "Schnur");
// now check if trying to access same catalog by specifying its data works: // now check if trying to access same catalog by specifying its data works:

View File

@ -114,27 +114,27 @@ CatalogTestAddOn::Check() {
assert(sig == catSig); assert(sig == catSig);
// now check strings: // now check strings:
s = TR_ID(hashVal); s = B_TRANSLATE_ID(hashVal);
assert(s == "Schnur_id_A"); assert(s == "Schnur_id_A");
s = TR_ALL("string", "programming", ""); s = B_TRANSLATE_ALL("string", "programming", "");
assert(s == "String_A"); assert(s == "String_A");
s = TR_ALL("string", "programming", "Deutsches Fachbuch"); s = B_TRANSLATE_ALL("string", "programming", "Deutsches Fachbuch");
assert(s == "Textpuffer_A"); assert(s == "Textpuffer_A");
s = TR_CMT("string", "Deutsches Fachbuch"); s = B_TRANSLATE_COMMENT("string", "Deutsches Fachbuch");
assert(s == "Leine_A"); assert(s == "Leine_A");
// the following string should be found in the embedded catalog only: // the following string should be found in the embedded catalog only:
s = TR_ALL("string", "base", ""); s = B_TRANSLATE_ALL("string", "base", "");
assert(s == "string_A"); assert(s == "string_A");
// the following id should be found in the embedded catalog only: // the following id should be found in the embedded catalog only:
s = TR_ID(32); s = B_TRANSLATE_ID(32);
assert(s == "hashed string_A"); assert(s == "hashed string_A");
// the following id doesn't exist anywhere (hopefully): // the following id doesn't exist anywhere (hopefully):
s = TR_ID(-1); s = B_TRANSLATE_ID(-1);
assert(s == ""); assert(s == "");
// the following string exists twice, in the embedded as well as in the // the following string exists twice, in the embedded as well as in the
// external catalog. So we should get the external translation (as it should // external catalog. So we should get the external translation (as it should
// override the embedded one): // override the embedded one):
s = TR("string"); s = B_TRANSLATE("string");
assert(s == "Schnur_A"); assert(s == "Schnur_A");
// check access to app-catalog from inside add-on: // check access to app-catalog from inside add-on: