Skip to content
This repository was archived by the owner on Nov 22, 2025. It is now read-only.

Commit 696c8f7

Browse files
committed
Updated links, license, readme
1 parent a0d060f commit 696c8f7

File tree

5 files changed

+11
-9
lines changed

5 files changed

+11
-9
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2019 Leadcode
3+
Copyright (c) 2019 Florin Bratan
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# flutter_translate
22

3-
[![Build Status](https://travis-ci.org/leadcode/flutter_translate.svg)](https://travis-ci.org/leadcode/flutter_translate)
3+
[![Build Status](https://travis-ci.org/bratan/flutter_translate.svg)](https://travis-ci.org/bratan/flutter_translate)
44
[![pub package](https://img.shields.io/pub/v/flutter_translate.svg)](https://pub.dev/packages/flutter_translate)
5-
[![License: MIT](https://img.shields.io/badge/License-MIT-ff69b4.svg)](https://github.com/leadcode/flutter_translate/blob/master/LICENSE)
5+
[![License: MIT](https://img.shields.io/badge/License-MIT-ff69b4.svg)](https://github.com/bratan/flutter_translate/blob/master/LICENSE)
66
[![Flutter.io](https://img.shields.io/badge/Flutter-Website-deepskyblue.svg)](https://flutter.io/)
77

88
---
@@ -11,7 +11,7 @@ The internationalization (i18n) library for Flutter.
1111

1212
It lets you define translations for your content in different languages and switch between them easily.
1313

14-
<img src="https://raw.githubusercontent.com/leadcode/flutter_translate/master/assets/gifs/flutter_translate_screen.gif" width="300"/>
14+
<img src="https://raw.githubusercontent.com/bratan/flutter_translate/master/assets/gifs/flutter_translate_screen.gif" width="300"/>
1515

1616
## Table of Contents
1717
- [Installation](#installation)
@@ -156,4 +156,4 @@ Widget build(BuildContext context) {
156156

157157
### You can view the full example here:
158158

159-
[https://github.com/leadcode/flutter_translate/blob/master/example/lib/main.dart](https://github.com/leadcode/flutter_translate/blob/master/example/lib/main.dart)
159+
[https://github.com/bratan/flutter_translate/blob/master/example/lib/main.dart](https://github.com/bratan/flutter_translate/blob/master/example/lib/main.dart)

example/lib/main.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import 'package:flutter/material.dart';
44
import 'package:flutter_translate/flutter_translate.dart';
55

66
void main() async {
7-
var delegate = await LocalizationDelegate.create(fallbackLanguage: 'en', supportedLanguages: ['en', 'es_ES', 'fa'], basePath: 'assets/i18n/');
7+
var delegate = await LocalizationDelegate.create(fallbackLanguage: 'en', supportedLanguages: ['en', 'es', 'fa']);
88
runApp(LocalizedApp(delegate, MyApp()));
99
}
1010

lib/localization_file_service.dart

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ class LocalizationFileService
3232

3333
Map<String, dynamic> map = jsonDecode(manifest);
3434

35-
return map.keys.where((x) => x.startsWith('$basePath/')).toList();
35+
var separator = basePath.endsWith('/') ? '' : '/';
36+
37+
return map.keys.where((x) => x.startsWith('$basePath$separator')).toList();
3638
}
3739

3840
static String _findLocalizationFile(String languageCode, List<String> localizedFiles, String basePath)
@@ -59,6 +61,6 @@ class LocalizationFileService
5961
{
6062
var separator = basePath.endsWith('/') ? '' : '/';
6163

62-
return '${basePath}${separator}${languageCode}.json';
64+
return '$basePath$separator$languageCode.json';
6365
}
6466
}

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: flutter_translate
22
description: The internationalization (i18n) library for Flutter. It lets you define translations for your content in different languages and switch between them easily.
3-
version: 1.2.5
3+
version: 1.2.6
44
author: Leadcode <dev@leadcode.io>
55
homepage: https://github.com/leadcode/flutter_translate
66

0 commit comments

Comments
 (0)