Skip to content

Commit

Permalink
Merge pull request seandepagnier#24 from stelian42/use-only-local-tra…
Browse files Browse the repository at this point in the history
…nslations

Use only the plugin translations, ignore the core OpenCPN ones.
  • Loading branch information
seandepagnier committed Feb 8, 2018
2 parents de77c4c + e373990 commit 0827bb1
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CelestialNavigation.fbp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<wxFormBuilder_Project>
<FileVersion major="1" minor="13" />
<object class="Project" expanded="1">
<property name="class_decoration"></property>
<property name="class_decoration">; wxWTranslateCatalog.h</property>
<property name="code_generation">C++</property>
<property name="disconnect_events">1</property>
<property name="disconnect_mode">source_name</property>
Expand Down
1 change: 1 addition & 0 deletions cmake/PluginConfigure.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ ENDIF (COMMAND cmake_policy)
MESSAGE (STATUS "*** Staging to build ${PACKAGE_NAME} ***")

configure_file(cmake/version.h.in ${PROJECT_SOURCE_DIR}/src/version.h)
configure_file(cmake/wxWTranslateCatalog.h.in ${PROJECT_SOURCE_DIR}/src/wxWTranslateCatalog.h)
SET(PACKAGE_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}" )

#SET(CMAKE_BUILD_TYPE Debug)
Expand Down
42 changes: 42 additions & 0 deletions cmake/wxWTranslateCatalog.h.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/******************************************************************************
* $Id: ocpn_draw_pi.h,v 1.0 2015/01/28 01:54:37 jongough Exp $
*
* Project: OpenCPN
* Purpose: Redefine _() macro to allow usage of catalog
* Author: Jon Gough
*
***************************************************************************
* Copyright (C) 2010 by David S. Register *
* $EMAIL$ *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************
*/
#ifndef _ODCATTRANS_H_
#define _ODCATTRANS_H_

#ifndef WXINTL_NO_GETTEXT_MACRO
#ifdef _
#undef _
#endif // _
#if wxCHECK_VERSION(3,0,0)
#define _(s) wxGetTranslation((s), wxS("opencpn-${PROJECT_NAME}"))
#else // wxCHECK_VERSION(3,0,0)
#define _(s) wxGetTranslation(wxT(s), wxT("opencpn-${PROJECT_NAME}"))
#endif // wxCHECK_VERSION(3,0,0)
#endif // WXINTL_NO_GETTEXT_MACRO

#endif
1 change: 1 addition & 0 deletions src/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
version.h
wxWTranslateCatalog.h
4 changes: 2 additions & 2 deletions src/CelestialNavigationUI.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Oct 3 2017)
// C++ code generated with wxFormBuilder (version Dec 20 2017)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
// PLEASE DO *NOT* EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////

#include "CelestialNavigationUI.h"
Expand Down
6 changes: 4 additions & 2 deletions src/CelestialNavigationUI.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Oct 3 2017)
// C++ code generated with wxFormBuilder (version Dec 20 2017)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
// PLEASE DO *NOT* EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////

#ifndef __CELESTIALNAVIGATIONUI_H__
Expand Down Expand Up @@ -38,6 +38,8 @@
#include <wx/html/htmlwin.h>
#include <wx/combobox.h>

#include "wxWTranslateCatalog.h"

///////////////////////////////////////////////////////////////////////////


Expand Down

0 comments on commit 0827bb1

Please sign in to comment.