[gtranslator] Use dl_server option instead dl_endpoint
- From: Daniel Garcia Moreno <danigm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtranslator] Use dl_server option instead dl_endpoint
- Date: Sun, 13 Mar 2022 11:09:21 +0000 (UTC)
commit 4ce808eb180ee0c78f8dca593c7f8fac125b5684
Author: Daniel GarcĂa Moreno <dani danigm net>
Date: Sun Mar 13 12:08:30 2022 +0100
Use dl_server option instead dl_endpoint
meson.build | 3 ++-
meson_options.txt | 6 +++---
src/gtr-dl-teams.c | 2 +-
3 files changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/meson.build b/meson.build
index b748afa8..1a2a0ac7 100644
--- a/meson.build
+++ b/meson.build
@@ -64,7 +64,8 @@ set_defines = [
['PROFILE', get_option('profile')],
# i18
['GETTEXT_PACKAGE', meson.project_name()],
- ['API_URL', get_option('dl_endpoint')],
+ ['DL_SERVER', get_option('dl_server')],
+ ['API_URL', get_option('dl_server') + '/api/v1/'],
]
foreach define: set_defines
diff --git a/meson_options.txt b/meson_options.txt
index 8319aef7..87260615 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -9,8 +9,8 @@ option (
value: 'default'
)
option (
- 'dl_endpoint',
+ 'dl_server',
type: 'string',
- value: 'https://l10n.gnome.org/api/v1/',
- description: 'Damned lies API endpoint'
+ value: 'https://l10n.gnome.org',
+ description: 'Damned lies Server'
)
diff --git a/src/gtr-dl-teams.c b/src/gtr-dl-teams.c
index aef10451..8bf1b9f1 100644
--- a/src/gtr-dl-teams.c
+++ b/src/gtr-dl-teams.c
@@ -492,7 +492,7 @@ gtr_dl_teams_load_po_file (GtkButton *button, GtrDlTeams *self)
/* Load the file, save as temp; path to file is https://l10n.gnome.org/[priv->file_path] */
session = soup_session_new ();
- msg = soup_message_new ("GET", g_strconcat ("https://l10n.gnome.org", g_strcompress(priv->file_path),
NULL));
+ msg = soup_message_new ("GET", g_strconcat (DL_SERVER, g_strcompress(priv->file_path), NULL));
soup_session_send_message (session, msg);
if (!SOUP_STATUS_IS_SUCCESSFUL (msg->status_code))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]