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

Commit

Permalink
4.2.1 Release
Browse files Browse the repository at this point in the history
  • Loading branch information
lcharette authored Mar 24, 2019
2 parents cf8e361 + 853eb69 commit da1eb3d
Show file tree
Hide file tree
Showing 47 changed files with 2,153 additions and 621 deletions.
6 changes: 2 additions & 4 deletions .php_cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,12 @@ $rules = [
'whitespace_after_comma_in_array' => true,

'header_comment' => [
'header' => $header,
'separate' => 'bottom',
'comment_type' => 'PHPDoc',
'header' => $header
]
];

$finder = PhpCsFixer\Finder::create()
->in([__DIR__ . '/src']);
->in([__DIR__ . '/src', __DIR__ . '/tests']);

return PhpCsFixer\Config::create()
->setRules($rules)
Expand Down
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [4.2.1]
- 100% Test coverage ([#9])
- Factor translate() into smaller methods ([#3])
- Fix misc issues for edge cases, especially when a plural rule couldn't be found
- General code improvements, test optimizations and code styling

## [4.2.0]
- Replaced `rockettheme/toolbox` with `userfrosting/uniformresourcelocator` from `userfrosting/support` **4.2.0**.

Expand All @@ -25,8 +31,11 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
## 4.0.0
- Initial release

[4.2.1]: https://github.com/userfrosting/i18n/compare/4.2.0...4.2.1
[4.2.0]: https://github.com/userfrosting/i18n/compare/4.1.0...4.2.0
[4.1.0]: https://github.com/userfrosting/i18n/compare/4.0.3...4.1.0
[4.0.3]: https://github.com/userfrosting/i18n/compare/4.0.2...4.0.3
[4.0.2]: https://github.com/userfrosting/i18n/compare/4.0.1...4.0.2
[4.0.1]: https://github.com/userfrosting/i18n/compare/4.0.0...4.0.1
[#3]: https://github.com/userfrosting/i18n/issues/3
[#9]: https://github.com/userfrosting/i18n/issues/9
23 changes: 21 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,30 @@

[![Latest Version](https://img.shields.io/github/release/userfrosting/i18n.svg)](https://github.com/userfrosting/i18n/releases)
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg)](LICENSE.md)
[![Build Status](https://travis-ci.org/userfrosting/i18n.svg?branch=master)](https://travis-ci.org/userfrosting/i18n)
[![Codecov](https://codecov.io/gh/userfrosting/i18n/branch/master/graph/badge.svg)](https://codecov.io/gh/userfrosting/i18n)
[![Join the chat at https://chat.userfrosting.com/channel/support](https://demo.rocket.chat/images/join-chat.svg)](https://chat.userfrosting.com/channel/support)
[![Donate](https://img.shields.io/badge/Open%20Collective-Donate-blue.svg)](https://opencollective.com/userfrosting#backer)

| Branch | Build | Coverage | Style |
| ------ |:-----:|:--------:|:-----:|
| [master][i18n] | [![][i18n-master-build]][i18n-travis] | [![][i18n-master-codecov]][i18n-codecov] | [![][i18n-style-master]][i18n-style] |
| [develop][i18n-develop] | [![][i18n-develop-build]][i18n-travis] | [![][i18n-develop-codecov]][i18n-codecov] | [![][i18n-style-develop]][i18n-style] |

<!-- Links -->
[i18n]: https://github.com/userfrosting/i18n
[i18n-develop]: https://github.com/userfrosting/i18n/tree/develop
[i18n-version]: https://img.shields.io/github/release/userfrosting/i18n.svg
[i18n-master-build]: https://travis-ci.org/userfrosting/i18n.svg?branch=master
[i18n-master-codecov]: https://codecov.io/gh/userfrosting/i18n/branch/master/graph/badge.svg
[i18n-develop-build]: https://travis-ci.org/userfrosting/i18n.svg?branch=develop
[i18n-develop-codecov]: https://codecov.io/gh/userfrosting/i18n/branch/develop/graph/badge.svg
[i18n-releases]: https://github.com/userfrosting/i18n/releases
[i18n-travis]: https://travis-ci.org/userfrosting/i18n
[i18n-codecov]: https://codecov.io/gh/userfrosting/i18n
[i18n-style-master]: https://github.styleci.io/repos/60137335/shield?branch=master&style=flat
[i18n-style-develop]: https://github.styleci.io/repos/60137335/shield?branch=develop&style=flat
[i18n-style]: https://github.styleci.io/repos/60137335


Louis Charette & Alexander Weissman, 2016-2019

The I18n module handles translation tasks for UserFrosting. The `MessageTranslator` class can be used as follows:
Expand Down
5 changes: 5 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,10 @@
"psr-4": {
"UserFrosting\\I18n\\": "src"
}
},
"autoload-dev": {
"psr-4": {
"UserFrosting\\I18n\\Tests\\": "tests"
}
}
}
12 changes: 7 additions & 5 deletions src/LocalePathBuilder.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?php
/**

/*
* UserFrosting i18n (http://www.userfrosting.com)
*
* @link https://github.com/userfrosting/i18n
Expand All @@ -9,8 +10,8 @@

namespace UserFrosting\I18n;

use UserFrosting\UniformResourceLocator\ResourceLocatorInterface;
use UserFrosting\Support\Repository\PathBuilder\PathBuilder;
use UserFrosting\UniformResourceLocator\ResourceLocatorInterface;

/**
* Globs together all files in specified locale(s) in each search path.
Expand Down Expand Up @@ -66,7 +67,8 @@ public function buildPaths()
* Adds provides locales to the end of the current locales list.
* Note that locale preference is ascending.
*
* @param string|string[] $locales
* @param string|string[] $locales
*
* @return $this
*/
public function addLocales($locales = [])
Expand Down Expand Up @@ -121,9 +123,9 @@ protected function buildLocalePaths($searchPaths, $locale)

// Search all paths for the specified locale
foreach ($searchPaths as $path) {
$localePath = rtrim($path, '/\\') . '/' . $locale;
$localePath = rtrim($path, '/\\').'/'.$locale;
// Grab all php files in the locale directory
$globs = glob($localePath . '/*.php');
$globs = glob($localePath.'/*.php');
$filePaths = array_merge($filePaths, $globs);
}

Expand Down
Loading

0 comments on commit da1eb3d

Please sign in to comment.