VirtualBox

source: vbox/trunk/src/VBox/Main/include/VBoxNls.h@ 91407

Last change on this file since 91407 was 91407, checked in by vboxsync, 3 years ago

Main: bugref:1909: Fixed scm issues

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.4 KB
Line 
1/* $Id: VBoxNls.h 91407 2021-09-27 15:20:15Z vboxsync $ */
2/** @file
3 * VBox NLS.
4 */
5
6/*
7 * Copyright (C) 2020 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 */
17
18
19#ifndef MAIN_INCLUDED_VBoxNls_h
20#define MAIN_INCLUDED_VBoxNls_h
21#ifndef RT_WITHOUT_PRAGMA_ONCE
22# pragma once
23#endif
24
25#ifdef VBOX_WITH_MAIN_NLS
26
27#include <VBox/com/defs.h>
28#include <VBox/com/ptr.h>
29#include <VBox/com/string.h>
30#include "VirtualBoxTranslator.h"
31
32
33# define DECLARE_TRANSLATION_CONTEXT(ctx) \
34struct ctx \
35{\
36 static const char *tr(const char *pszSource, const char *pszComment = NULL, const int iNum = -1) \
37 { \
38 return VirtualBoxTranslator::translate(NULL, #ctx, pszSource, pszComment, iNum); \
39 } \
40}
41#else
42# define DECLARE_TRANSLATION_CONTEXT(ctx) \
43struct ctx \
44{\
45 static const char *tr(const char *pszSource, const char *pszComment = NULL, const int iNum = -1) \
46 { \
47 NOREF(pszComment); \
48 NOREF(iNum); \
49 return pszSource; \
50 } \
51}
52#endif
53
54#endif /* !MAIN_INCLUDED_VBoxNls_h */
55
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette