Skip to content
This repository has been archived by the owner on Feb 24, 2024. It is now read-only.

Localized partials not recognized with non localized template #1994

Closed
fredcarle opened this issue May 24, 2020 · 3 comments
Closed

Localized partials not recognized with non localized template #1994

fredcarle opened this issue May 24, 2020 · 3 comments
Assignees
Labels
s: duplicate This issue or pull request already exists

Comments

@fredcarle
Copy link

fredcarle commented May 24, 2020

Description

This is either a bug or a missing feature and I couldn't quite figure it out just by looking at the source code. I'm trying to localized partials within non localized template file and it wont work unless I create a duplicate with the proper localized name and point the partial specifically to the localized partial.

Steps to Reproduce the Problem

  1. Create an index.plush.html file.
  2. Create partials _content.en.html and _content.fr.html
  3. Access /fr/index -> outputs _content.fr.html
  4. Access /en/index -> outputs _content.fr.html

Expected Behavior

  1. Access /fr/index -> outputs _content.fr.html
  2. Access /en/index -> outputs _content.en.html

Actual Behavior

If index is not localized, regardless of the requested language, the same content will be presented.

Info

-> Go: Checking minimum version requirements
✓ Your version of Go, 1.14.2, meets the minimum requirements.

-> Go: Checking Package Management
✓ You are using Go Modules (`go`) for package management.

-> Go: Checking PATH
✓ Your PATH contains ~/code/go/bin.

-> Node: Checking installation
✓ The `node` executable was found on your system at: /usr/local/bin/node

-> Node: Checking minimum version requirements
✓ Your version of Node, v13.10.1, meets the minimum requirements.

-> NPM: Checking installation
✓ The `npm` executable was found on your system at: /usr/local/bin/npm

-> NPM: Checking minimum version requirements
✓ Your version of NPM, 6.13.7, meets the minimum requirements.

-> Yarn: Checking installation
✓ The `yarnpkg` executable was found on your system at: /usr/local/bin/yarnpkg

-> Yarn: Checking minimum version requirements
✓ Your version of Yarn, 1.22.4, meets the minimum requirements.

-> PostgreSQL: Checking installation
✘ The `postgres` executable could not be found on your system.
For help setting up your Postgres environment please follow the instructions for you platform at:

https://www.postgresql.org/download/

-> MySQL: Checking installation
✘ The `mysql` executable could not be found on your system.
For help setting up your MySQL environment please follow the instructions for you platform at:

https://www.mysql.com/downloads/

-> SQLite3: Checking installation
✓ The `sqlite3` executable was found on your system at: /usr/bin/sqlite3

-> SQLite3: Checking minimum version requirements
✓ Your version of SQLite3, 3.28.0, meets the minimum requirements.

-> Cockroach: Checking installation
✘ The `cockroach` executable could not be found on your system.
For help setting up your Cockroach environment please follow the instructions for you platform at:

https://www.cockroachlabs.com/docs/stable/

-> Buffalo (CLI): Checking installation
✓ The `buffalo` executable was found on your system at: /usr/local/bin/buffalo

-> Buffalo (CLI): Checking minimum version requirements
✓ Your version of Buffalo (CLI), v0.16.8, meets the minimum requirements.

-> Buffalo: Application Details
Pwd         ~/code/bagsort/bagsort_static
Root       ~/code/bagsort/bagsort_static
GoPath      ~/code/go
PackagePkg  bagsort_static
ActionsPkg  bagsort_static/actions
ModelsPkg   bagsort_static/models
GriftsPkg   bagsort_static/grifts
WithModules true
Name        bagsort-static
Bin         bin/bagsort-static
VCS         git
WithPop     true
WithSQLite  false
WithDep     false
WithWebpack true
WithNodeJs  true
WithYarn    true
WithDocker  true
WithGrifts  true
AsWeb       true
AsAPI       false
InApp       true
PackageJSON {map[build:webpack -p --progress check-types:tsc dev:webpack --watch]}

-> Buffalo: config/buffalo-app.toml
name = "bagsort-static"
bin = "bin/bagsort-static"
vcs = "git"
with_pop = true
with_sqlite = false
with_dep = false
with_webpack = true
with_nodejs = true
with_yarn = true
with_docker = true
with_grifts = true
as_web = true
as_api = false

-> Buffalo: config/buffalo-plugins.toml
[[plugin]]
  binary = "buffalo-pop"
  go_get = "github.com/gobuffalo/buffalo-pop/v2"

-> Buffalo: go.mod
module bagsort_static

go 1.13

require (
	github.com/davecgh/go-spew v1.1.1
	github.com/gobuffalo/buffalo v0.15.5
	github.com/gobuffalo/buffalo-pop/v2 v2.0.6
	github.com/gobuffalo/envy v1.9.0
	github.com/gobuffalo/mw-csrf v0.0.0-20190129204204-25460a055517
	github.com/gobuffalo/mw-forcessl v0.0.0-20180802152810-73921ae7a130
	github.com/gobuffalo/mw-i18n v0.0.0-20190129204410-552713a3ebb4
	github.com/gobuffalo/mw-paramlogger v0.0.0-20190129202837-395da1998525
	github.com/gobuffalo/packr/v2 v2.8.0
	github.com/gobuffalo/pop/v5 v5.1.1
	github.com/gobuffalo/suite v2.8.2+incompatible
	github.com/markbates/grift v1.5.0
	github.com/pkg/errors v0.9.1
	github.com/unrolled/secure v0.0.0-20190103195806-76e6d4e9b90c
)
@github-actions
Copy link

github-actions bot commented Aug 7, 2021

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions
Copy link

This issue was closed because it has been stalled for 5 days with no activity.

@sio4 sio4 added # chkme s: duplicate This issue or pull request already exists and removed # chkme labels Sep 26, 2022
@sio4
Copy link
Member

sio4 commented Sep 26, 2022

Oh, it seems like this issue is the same as #2259. It's too late, but will you check if the issue is the same?

By the way, it was fixed now.

@sio4 sio4 self-assigned this Sep 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
s: duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants