Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
ibrahimpenekli committed Apr 16, 2023
2 parents 24ed452 + 6247905 commit c0ce6d7
Show file tree
Hide file tree
Showing 16 changed files with 615 additions and 333 deletions.
25 changes: 5 additions & 20 deletions .github/workflows/deploy-upm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
pull_request:
branches: [ master ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand All @@ -23,21 +21,8 @@ jobs:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

- name: Commit changes to upm branch
run: git subtree split --prefix=Packages/com.gametoolkit.localization --branch upm

- name: Get version
id: version
uses: notiz-dev/github-action-json-property@release
with:
path: "Packages/com.gametoolkit.localization/package.json"
prop_path: "version"

- name: Create version tag
run: |
PKG_VERSION=${{steps.version.outputs.prop}}
git ls-remote --exit-code --tags origin $PKG_VERSION && echo "Same version already exists '$PKG_VERSION'" && exit 7
git tag $PKG_VERSION upm
- name: Push version and upm branch
run: git push origin upm --tags --force
- name: Publish Unity package
uses: cdmvision/action-upm-publish@v1
with:
name: 'com.gametoolkit.localization'
upmBranch: 'upm'
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
/[Bb]uilds/
/Assets/AssetStoreTools*
Logs/
UserSettings/
ProjectSettings/boot.config

# Ignore JetBrains Rider
/.idea/
Expand Down
86 changes: 0 additions & 86 deletions Logs/Packages-Update.log

This file was deleted.

4 changes: 4 additions & 0 deletions Packages/com.gametoolkit.localization/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this package 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).

## [2.2.3] - 2023-04-16
### News
- Fixed a bug that multiple `LocalizationSettings` assets created if Library folder is deleted

## [2.2.2] - 2021-07-31
### News
- `LocalizedText` can be created at runtime
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,24 @@ public override void OnInspectorGUI()
if (m_AvailableLanguagesList != null)
{
serializedObject.Update();

var settings = (LocalizationSettings) target;
if (LocalizationSettings.ActiveSettings != settings)
{


EditorGUILayout.BeginHorizontal();
EditorGUILayout.HelpBox("This is not active localization settings.", MessageType.Warning);

if (GUILayout.Button("Make\nActive", GUILayout.ExpandHeight(true)))
{
LocalizationSettings.ActiveSettings = settings;
}

EditorGUILayout.EndHorizontal();
}
EditorGUILayout.Separator();

m_AvailableLanguagesList.DoLayoutList();

EditorGUILayout.LabelField("Import/Export", EditorStyles.boldLabel);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ private Rect BottomToolbarRect
}

[MenuItem(EditorMenu.RootMenu + WindowName, false, 0)]
public static void ShowWindow()
{
GetWindow();
}

public static LocalizationWindow GetWindow()
{
s_Instance = GetWindow<LocalizationWindow>();
Expand Down
26 changes: 25 additions & 1 deletion Packages/com.gametoolkit.localization/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
# Asset Localization
# Asset Localization for Unity
[![Download](https://img.shields.io/badge/asset_store-yellow.svg)](http://u3d.as/XhJ)
[![Documentation](https://img.shields.io/badge/documentation-yellow.svg)](https://hibrahimpenekli.gitbook.io/gametoolkit-localization/)
[![Forum](https://img.shields.io/badge/forum-yellow.svg)](https://forum.unity.com/threads/released-asset-localization-for-unity.723047/)
[![Unity Version](https://img.shields.io/badge/unity-2017.1%2B-blue)](https://unity3d.com/get-unity/download)
[![Version](https://img.shields.io/github/package-json/v/ibrahimpenekli/GameToolkit-Localization/upm?color=green&label=version)](https://github.com/ibrahimpenekli/GameToolkit-Localization/releases)

With Asset Localization, you can easily localize your built-in Unity game assets. Also you can create custom localizable asset functionality for your custom assets.

<img src="https://gblobscdn.gitbook.com/assets%2F-LRhqW6j6mRgZoErSCt2%2F-M2m2MhG96P11UHD_TwZ%2F-M2mBXVWhss4GKBTRhZr%2FUnityAssetLocalization_Preview.gif?alt=media&token=60bb7192-4cc2-4c86-9e6d-b9a7b85c9693" alt="Preview" width="100%">

## Features:
* Built-in [Text](https://docs.unity3d.com/Manual/script-Text.html), [TextAsset](https://docs.unity3d.com/Manual/class-TextAsset.html), [VideoClip](https://docs.unity3d.com/Manual/class-VideoClip.html), [AudioClip](https://docs.unity3d.com/Manual/class-AudioClip.html), [Sprite](https://docs.unity3d.com/Manual/Sprites.html), [Texture](https://docs.unity3d.com/ScriptReference/Texture.html), [Font](https://docs.unity3d.com/Manual/class-Font.html) and [Prefab](https://docs.unity3d.com/Manual/Prefabs.html) localization
* Edit everything through [Localization Explorer](../../wiki/Localization-Explorer) window
* Import/Export [CSV](https://en.wikipedia.org/wiki/Comma-separated_values) file
* [Quick text translation](../../wiki/Localization-Explorer#3-quick-translate-missing-locales) inside the Editor with [Google Translate](https://cloud.google.com/translate/) engine
* Adding more custom languages in addition to the [built-in languages](https://docs.unity3d.com/ScriptReference/SystemLanguage.html)
* [Extensible localized asset](../../wiki/Scripting-Reference#extending-custom-localized-asset-behaviour) support
* Used locales are automatically added to Info.plist on iOS build
* Lightweight and easy to use
* No coding required

Required Unity 2017.1 or newer version.

## Install from Package Manager:
* Add `"com.gametoolkit.localization": "https://github.com/ibrahimpenekli/GameToolkit-Localization.git#2.2.3"` to your project's package manifest file in dependencies section.
* Or, `Package Manager > Add package from git URL...` and paste this URL: `https://github.com/ibrahimpenekli/GameToolkit-Localization.git#2.2.3`

0 comments on commit c0ce6d7

Please sign in to comment.