diff --git a/Makefile b/Makefile index e9e363a..63284fa 100644 --- a/Makefile +++ b/Makefile @@ -6,14 +6,14 @@ SHELL = /bin/sh srcdir = . GO ?= go -GOFLAGS ?= +GOFLAGS ?= -buildvcs=true EXECUTABLE ?= indieauth #### End of system configuration section. #### .PHONY: all clean check help -all: main.go +all: $(GO) build -v $(GOFLAGS) -o $(EXECUTABLE) $< clean: ## Delete all files in the current directory that are normally created by building the program diff --git a/catalog_gen.go b/catalog_gen.go index 8509baf..6938dcd 100644 --- a/catalog_gen.go +++ b/catalog_gen.go @@ -44,37 +44,38 @@ var messageKeyToIndex = map[string]int{ "Authorize application": 1, "Choose your scopes": 2, "Deny": 3, - "Error": 5, - "How do I fix it?": 6, - "Recipient": 9, - "Resource": 10, - "Send": 11, - "Sign In": 7, - "TicketAuth": 8, + "Error": 6, + "How do I fix it?": 7, + "Recipient": 10, + "Resource": 11, + "Send": 12, + "Sign In": 8, + "TicketAuth": 9, + "version": 5, } -var enIndex = []uint32{ // 13 elements +var enIndex = []uint32{ // 14 elements 0x00000000, 0x00000010, 0x00000026, 0x00000039, - 0x0000003e, 0x00000044, 0x0000004a, 0x0000005b, - 0x00000063, 0x0000006e, 0x00000078, 0x00000081, - 0x00000086, -} // Size: 76 bytes + 0x0000003e, 0x00000044, 0x0000004c, 0x00000052, + 0x00000063, 0x0000006b, 0x00000076, 0x00000080, + 0x00000089, 0x0000008e, +} // Size: 80 bytes -const enData string = "" + // Size: 134 bytes +const enData string = "" + // Size: 142 bytes "\x02Authorize %[1]s\x02Authorize application\x02Choose your scopes\x02De" + - "ny\x02Allow\x02Error\x02How do I fix it?\x02Sign In\x02TicketAuth\x02Rec" + - "ipient\x02Resource\x02Send" + "ny\x02Allow\x02version\x02Error\x02How do I fix it?\x02Sign In\x02Ticket" + + "Auth\x02Recipient\x02Resource\x02Send" -var ruIndex = []uint32{ // 13 elements +var ruIndex = []uint32{ // 14 elements 0x00000000, 0x0000001f, 0x0000004d, 0x0000008e, - 0x0000009f, 0x000000b2, 0x000000bf, 0x000000e1, - 0x000000ec, 0x000000f7, 0x0000010c, 0x00000119, - 0x0000012c, -} // Size: 76 bytes + 0x0000009f, 0x000000b2, 0x000000bf, 0x000000cc, + 0x000000ee, 0x000000f9, 0x00000104, 0x00000119, + 0x00000126, 0x00000139, +} // Size: 80 bytes -const ruData string = "" + // Size: 300 bytes +const ruData string = "" + // Size: 313 bytes "\x02Авторизовать %[1]s\x02Авторизовать приложение\x02Выбери предоставляе" + - "мые разрешения\x02Отказать\x02Разрешить\x02Ошибка\x02Как исправить это?" + - "\x02Войти\x02TicketAuth\x02Получатель\x02Ресурс\x02Отправить" + "мые разрешения\x02Отказать\x02Разрешить\x02версия\x02Ошибка\x02Как испр" + + "авить это?\x02Войти\x02TicketAuth\x02Получатель\x02Ресурс\x02Отправить" - // Total table size 586 bytes (0KiB); checksum: D0ACA2B7 + // Total table size 615 bytes (0KiB); checksum: 66FB60EC diff --git a/locales/en/out.gotext.json b/locales/en/out.gotext.json index 19616d5..98f834c 100644 --- a/locales/en/out.gotext.json +++ b/locales/en/out.gotext.json @@ -46,6 +46,13 @@ "translatorComment": "The name of the button to continue the application authorization process", "fuzzy": true }, + { + "id": "version", + "message": "version", + "translation": "version", + "translatorComment": "Copied from source.", + "fuzzy": true + }, { "id": "Error", "message": "Error", diff --git a/locales/ru/messages.gotext.json b/locales/ru/messages.gotext.json index b98c94f..804ab12 100644 --- a/locales/ru/messages.gotext.json +++ b/locales/ru/messages.gotext.json @@ -40,6 +40,11 @@ "translation": "Разрешить", "translatorComment": "Название кнопки продолжения процесса авторизациии приложения" }, + { + "id": "version", + "message": "version", + "translation": "версия" + }, { "id": "Error", "message": "Error", diff --git a/locales/ru/out.gotext.json b/locales/ru/out.gotext.json index b98c94f..804ab12 100644 --- a/locales/ru/out.gotext.json +++ b/locales/ru/out.gotext.json @@ -40,6 +40,11 @@ "translation": "Разрешить", "translatorComment": "Название кнопки продолжения процесса авторизациии приложения" }, + { + "id": "version", + "message": "version", + "translation": "версия" + }, { "id": "Error", "message": "Error", diff --git a/web/baseof.qtpl b/web/baseof.qtpl index 0e026c9..5578363 100644 --- a/web/baseof.qtpl +++ b/web/baseof.qtpl @@ -1,4 +1,6 @@ {% import ( + "runtime/debug" + "golang.org/x/text/language" "golang.org/x/text/message" @@ -75,6 +77,33 @@
{%= p.Body() %} + + {% code + var path, vcsRevision string + + if bi, ok := debug.ReadBuildInfo(); ok { + path = bi.Path + + for i := range bi.Settings { + if bi.Settings[i].Key != "vcs.revision" { + continue + } + + vcsRevision = bi.Settings[i].Value + } + } + %} + + {% if vcsRevision != "" %} + + {% endif %}