Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move locales.php into a separate repo #350

Closed
ocean90 opened this issue Mar 17, 2016 · 7 comments
Closed

Move locales.php into a separate repo #350

ocean90 opened this issue Mar 17, 2016 · 7 comments
Assignees
Labels
[Status] Wontfix Issues/PRs we will (likely) not implement. [Type] Feature New feature to highlight in changelog.

Comments

@ocean90
Copy link
Member

ocean90 commented Mar 17, 2016

Proposal:

  • Move locales/locales.php to a repo at glotpress/locales
  • Include glotpress/locales as a submodule for this plugin

Why? To separate the flow of adding new locales from the plugin. For example we can use templates (https://github.com/blog/2111-issue-and-pull-request-templates). It makes it also easier to use for other projects which don't need the whole GlotPress, just the list of locales.

We can and should also try to make some of the pre-checks, like valid ISO codes or locale names, automated via Travis CI.

@toolstack
Copy link
Contributor

We should probably even go farther than that and allow a site to update their locales independently of GlotPress.

I agree it should be it's own repo and a submodule to GlotPress-WP, but beyond that:

  • There should be an admin interface to pull a new copy of the locales from the repo and update GP.
  • Maybe create a new table to hold the locales so that individual sites can add their own custom ones wihout losing them on each upgrade (or not getting new locales if they've used their own locales.php).

@ocean90
Copy link
Member Author

ocean90 commented Mar 17, 2016

locales.php is a drop-in and can be replaced. So it can also replaced with a file which uses a db table for the locales, it just needs to implement the public methods like by_field() or locales().

@ocean90 ocean90 modified the milestone: 2.1 Apr 1, 2016
@ocean90
Copy link
Member Author

ocean90 commented Apr 4, 2016

Example: https://github.com/ocean90/gp-locales/commits/develop/locales.php

$ git clone git@github.com:ocean90/GlotPress-WP.git
$ cd GlotPress-WP
$ git filter-branch --prune-empty --subdirectory-filter locales develop
$ git remote set-url origin git@github.com:ocean90/gp-locales.git
$ git push origin HEAD

Based on https://help.github.com/articles/splitting-a-subfolder-out-into-a-new-repository/.

@toolstack
Copy link
Contributor

I'm thinking we need to take a closer look at how the locales are managed, #385 is a good example where we probably need some more rigor around how locales are changed.

I think we need to separate the class from the data and build out the class to handle adding, updating and deleting locales, probably as data in a table.

@ocean90 ocean90 self-assigned this Apr 7, 2016
@ocean90 ocean90 added [Type] Feature New feature to highlight in changelog. and removed [Type] Question/Discussion labels Apr 7, 2016
@ocean90
Copy link
Member Author

ocean90 commented Apr 13, 2016

There is https://github.com/GlotPress/gp-locales now. The is only one issue with a separate repo: It's not possible to include just one file as a submodule. Not sure if it's a good idea to include all the upcoming tests and readmes too.

@ocean90
Copy link
Member Author

ocean90 commented Apr 13, 2016

Not sure if it's a good idea to include all the upcoming tests and readmes too.

We could add them to https://github.com/GlotPress/GlotPress-WP/blob/develop/bin/release.ini#L21

@ocean90 ocean90 added the [Status] Wontfix Issues/PRs we will (likely) not implement. label Apr 20, 2016
@ocean90 ocean90 removed this from the 2.1 milestone Apr 20, 2016
@ocean90
Copy link
Member Author

ocean90 commented Apr 20, 2016

Closing as a wontfix for now.

@ocean90 ocean90 closed this as completed Apr 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Status] Wontfix Issues/PRs we will (likely) not implement. [Type] Feature New feature to highlight in changelog.
Projects
None yet
Development

No branches or pull requests

2 participants