Compare commits

...

6 Commits

Author SHA1 Message Date
Carlosokumu
7880294c6f set eng as default language 2024-11-20 17:14:25 +03:00
Carlosokumu
451b15fb6b explicit set_language reload 2024-11-20 17:13:14 +03:00
Carlosokumu
d20700ca74 fix size limit error 2024-11-20 16:39:50 +03:00
Carlosokumu
9cf1cbe425 add swahili translation for catch node 2024-11-20 16:36:18 +03:00
212cd48249 debug: postgres conn string
Some checks failed
release / docker (push) Has been cancelled
2024-11-19 17:53:06 +03:00
7adc0c9c08 fix: Dockerfile to include .env
Some checks failed
release / docker (push) Has been cancelled
2024-11-19 17:25:20 +03:00
8 changed files with 14 additions and 6 deletions

View File

@@ -10,4 +10,4 @@
!/LICENSE
!/README.md
!/go.*
!/.env
!/.env.example

View File

@@ -18,7 +18,7 @@ RUN make VISE_PATH=/build/go-vise -B
WORKDIR /build
RUN echo "Building on $BUILDPLATFORM, building for $TARGETPLATFORM"
RUN go mod download
RUN go build -o ussd-africastalking -ldflags="-X main.build=${BUILD} -s -w" cmd/africastalking/main.go
RUN go build -tags logtrace -o ussd-africastalking -ldflags="-X main.build=${BUILD} -s -w" cmd/africastalking/main.go
FROM debian:bookworm-slim
@@ -33,7 +33,8 @@ COPY --from=build /build/ussd-africastalking .
COPY --from=build /build/LICENSE .
COPY --from=build /build/README.md .
COPY --from=build /build/services ./services
COPY --from=build /build/.env .
COPY --from=build /build/.env.example .
RUN mv .env.example .env
EXPOSE 7123

View File

@@ -154,7 +154,8 @@ func (h *Handlers) SetLanguage(ctx context.Context, sym string, input []byte) (r
code := strings.Split(symbol, "_")[1]
if !utils.IsValidISO639(code) {
return res, nil
//Fallback to english instead?
code = "eng"
}
res.FlagSet = append(res.FlagSet, state.FLAG_LANG)
res.Content = code

View File

@@ -41,10 +41,13 @@ func buildConnStr() string {
dbName := initializers.GetEnv("DB_NAME", "")
port := initializers.GetEnv("DB_PORT", "5432")
return fmt.Sprintf(
connString := fmt.Sprintf(
"postgres://%s:%s@%s:%s/%s",
user, password, host, port, dbName,
)
logg.Debugf("pg conn string", "conn", connString)
return connString
}
func NewMenuStorageService(dbDir string, resourceDir string) *MenuStorageService {

View File

@@ -0,0 +1 @@
Tatizo la kimtambo limetokea,tafadhali jaribu tena baadaye.

View File

@@ -1,6 +1,6 @@
LOAD set_default_voucher 8
RELOAD set_default_voucher
LOAD check_balance 64
LOAD check_balance 128
RELOAD check_balance
LOAD check_vouchers 10
RELOAD check_vouchers

View File

@@ -1,3 +1,4 @@
LOAD set_language 6
RELOAD set_language
CATCH terms flag_account_created 0
MOVE language_changed

View File

@@ -1,3 +1,4 @@
LOAD set_language 6
RELOAD set_language
CATCH terms flag_account_created 0
MOVE language_changed